|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.enunciate.modules.BasicDeploymentModule
org.codehaus.enunciate.modules.FreemarkerDeploymentModule
org.codehaus.enunciate.modules.php.PHPDeploymentModule
public class PHPDeploymentModule
The PHP module generates PHP data types that can be used in conjunction with the PHP JSON implementation to (de)serialize the REST resources as they are represented as JSON data.
The order of the PHP deployment module is 0, as it doesn't depend on any artifacts exported by any other module.
The PHP module is configured with the "php" element under the "modules" element of the enunciate configuration file. It supports the following attributes:
The "package-conversions" subelement of the "php" element is used to map packages from the original API packages to PHP modules. This element supports an arbitrary number of "convert" child elements that are used to specify the conversions. These "convert" elements support the following attributes:
The "facets" element is applicable to the Ruby module to configure which facets are to be included/excluded from the Ruby artifacts. For more information, see API Facets
| Field Summary |
|---|
| Fields inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
enunciate |
| Constructor Summary | |
|---|---|
PHPDeploymentModule()
|
|
| Method Summary | |
|---|---|
void |
addClientPackageConversion(PackageModuleConversion conversion)
Add a client package conversion. |
void |
addFacetExclude(String name)
Add a facet exclude. |
void |
addFacetInclude(String name)
Add a facet include. |
protected void |
doBuild()
|
void |
doFreemarkerGenerate()
|
protected boolean |
existsAnyJsonResourceMethod(List<RootResource> rootResources)
Whether any root resources exist that produce json. |
protected String |
getBundleFileName()
The name of the bundle file. |
org.apache.commons.digester.RuleSet |
getConfigurationRules()
|
Set<String> |
getFacetExcludes()
The set of facets to exclude. |
Set<String> |
getFacetIncludes()
The set of facets to include. |
String |
getLabel()
The label for the PHP API. |
String |
getName()
|
protected freemarker.template.ObjectWrapper |
getObjectWrapper()
|
Map<String,String> |
getPackageToModuleConversions()
The package-to-module conversions. |
protected String |
getSourceFileName()
The name of the generated PHP source file. |
protected URL |
getTemplateURL(String template)
Get a template URL for the template of the given name. |
Validator |
getValidator()
|
void |
initModel(EnunciateFreemarkerModel model)
|
boolean |
isDisabled()
|
boolean |
isForceEnable()
Whether to force-enable the PHP module. |
boolean |
isSingleFilePerClass()
Whether there should be a single file per class. |
void |
onClassesFound(Set<String> classes)
|
protected String |
packageToModule(String pckg)
|
protected String |
readResource(String resource)
Reads a resource into string form. |
void |
setForceEnable(boolean forceEnable)
Whether to force-enable the PHP module. |
void |
setLabel(String label)
The label for the PHP API. |
void |
setSingleFilePerClass(boolean singleFilePerClass)
Whether there should be a single file per class. |
| Methods inherited from class org.codehaus.enunciate.modules.FreemarkerDeploymentModule |
|---|
close, doGenerate, getConfiguration, getModel, getModelInternal, getTemplateExceptionHandler, getTemplateLoader, processTemplate, processTemplate, processTemplate, processTemplate |
| Methods inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
debug, doCompile, doPackage, getAliases, getBuildDir, getCompileDir, getEnunciate, getGenerateDir, getOrder, getPackageDir, info, init, setBuildDir, setCompileDir, setDisabled, setGenerateDir, setPackageDir, step, warn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PHPDeploymentModule()
| Method Detail |
|---|
public String getName()
getName in interface DeploymentModulegetName in class BasicDeploymentModulepublic void onClassesFound(Set<String> classes)
onClassesFound in interface EnunciateClasspathListenerpublic void initModel(EnunciateFreemarkerModel model)
initModel in interface EnunciateModelAwareinitModel in class FreemarkerDeploymentModuleprotected String packageToModule(String pckg)
public void doFreemarkerGenerate()
throws IOException,
freemarker.template.TemplateException,
EnunciateException
doFreemarkerGenerate in class FreemarkerDeploymentModuleIOException
freemarker.template.TemplateException
EnunciateException
protected void doBuild()
throws EnunciateException,
IOException
doBuild in class BasicDeploymentModuleEnunciateException
IOExceptionprotected String getBundleFileName()
protected String readResource(String resource)
throws IOException,
EnunciateException
resource - The resource to read.
IOException
EnunciateExceptionprotected String getSourceFileName()
protected freemarker.template.ObjectWrapper getObjectWrapper()
getObjectWrapper in class FreemarkerDeploymentModuleprotected URL getTemplateURL(String template)
template - The specified template.
public boolean isForceEnable()
public void setForceEnable(boolean forceEnable)
forceEnable - Whether to force-enable the PHP module.public String getLabel()
public void setLabel(String label)
label - The label for the PHP API.public Map<String,String> getPackageToModuleConversions()
public void addClientPackageConversion(PackageModuleConversion conversion)
conversion - The conversion to add.public org.apache.commons.digester.RuleSet getConfigurationRules()
getConfigurationRules in interface DeploymentModulegetConfigurationRules in class BasicDeploymentModulepublic Validator getValidator()
getValidator in interface DeploymentModulegetValidator in class BasicDeploymentModulepublic Set<String> getFacetIncludes()
public void addFacetInclude(String name)
name - The name.public Set<String> getFacetExcludes()
public void addFacetExclude(String name)
name - The name.public boolean isSingleFilePerClass()
public void setSingleFilePerClass(boolean singleFilePerClass)
singleFilePerClass - Whether there should be a single file per class.public boolean isDisabled()
isDisabled in interface DeploymentModuleisDisabled in class BasicDeploymentModuleprotected boolean existsAnyJsonResourceMethod(List<RootResource> rootResources)
rootResources - The root resources.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||