Ok. The api that you want is available in the following package:
org.eclipse.wst.common.project.facet.core.*
A dynamic web project is basically a project with at least "jst.java"
and "jst.web" facets installed.
The following class is an entry point to the API with a bunch of static
methods:
org.eclipse.wst.common.project.facet.core.ProjectFacetsManager
You will want to call one of the create methods on ProjectFacetsManager
to get an IFacetedProject object. That object has methods for setting
the runtime, installing facets, etc.
- Konstantin