|
|||||||||
| 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.xml.XMLDeploymentModule
public class XMLDeploymentModule
The XML deployment module generates the consolidated WSDLs and schemas for the API..
The only significant step in the XML deployment module is the "generate" step. This step generates the WSDLs and schemas for the API.
The configuration for the XML deployment module is specified by the "xml" child element of the "modules" element of the enunciate configuration file. It supports the following attributes:
The "xml" element supports an arbitrary number of "schema" child elements that are used to configure the schema for a specified namespace. It supports the following attributes:
The "schema" element also supports a nested subelement, "appinfo" whose contents will be inlined into the schema "appinfo" annotation.
The "xml" element supports an arbitrary number of "wsdl" child elements that are used to configure the wsdl for a specified namespace. It supports the following attributes:
The XML deployment module exports artifacts for each WSDL and schema produced. The id of the artifact is the name of the prefix for the namespace of hte file appended with ".wsdl" (for wsdls) and ".xsd" (for schemas).
| Field Summary |
|---|
| Fields inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
enunciate |
| Constructor Summary | |
|---|---|
XMLDeploymentModule()
|
|
| Method Summary | |
|---|---|
void |
addSchemaConfig(SchemaConfig config)
Add a custom schema configuration. |
void |
addWsdlConfig(WsdlConfig config)
Add a custom wsdl configuration. |
void |
doFreemarkerGenerate()
Generate using Freemarker. |
org.apache.commons.digester.RuleSet |
getConfigurationRules()
Default implementation returns null. |
java.lang.String |
getName()
The name of the deployment module. |
protected freemarker.template.ObjectWrapper |
getObjectWrapper()
The object wrapper to use for the model. |
protected java.net.URL |
getTemplateURL()
The URL to "xml.fmt". |
Validator |
getValidator()
Get the validator for this module, or null if none. |
void |
init(Enunciate enunciate)
Sets the enunciate mechanism. |
void |
initModel(EnunciateFreemarkerModel model)
Initialize the model. |
boolean |
isDisableWadl()
Whether to disable the WADL. |
protected boolean |
isUpToDate(java.io.File artifactDir)
Whether the artifact directory is up-to-date. |
protected void |
prettyPrint(java.io.File file)
Pretty-prints the specified xml file. |
void |
setDisableWadl(boolean disableWadl)
Whether to disable the WADL. |
void |
setInlineWSDLSchemas(boolean inlineWSDLSchemas)
Whether to inline the WSDL schemas. |
void |
setPrettyPrint(boolean prettyPrint)
Whether to pretty-print the xml. |
void |
setValidateSchemas(boolean validateSchemas)
Whether to validate the generated schemas in an attempt to catch possible errors that enunciate might have missed. |
| 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, doBuild, doCompile, doPackage, getAliases, getBuildDir, getCompileDir, getEnunciate, getGenerateDir, getOrder, getPackageDir, info, isDisabled, 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 XMLDeploymentModule()
| Method Detail |
|---|
public java.lang.String getName()
DeploymentModule
getName in interface DeploymentModulegetName in class BasicDeploymentModuleprotected java.net.URL getTemplateURL()
public void addSchemaConfig(SchemaConfig config)
config - The configuration to add.public void addWsdlConfig(WsdlConfig config)
config - The configuration to add.
public void init(Enunciate enunciate)
throws EnunciateException
BasicDeploymentModule
init in interface DeploymentModuleinit in class BasicDeploymentModuleenunciate - The enunciate mechanism.
EnunciateExceptionpublic void initModel(EnunciateFreemarkerModel model)
EnunciateModelAware
initModel in interface EnunciateModelAwareinitModel in class FreemarkerDeploymentModulemodel - The model to initialize.
public void doFreemarkerGenerate()
throws java.io.IOException,
freemarker.template.TemplateException
FreemarkerDeploymentModuleFreemarkerDeploymentModule.doGenerate() but can throw a TemplateException.
doFreemarkerGenerate in class FreemarkerDeploymentModulejava.io.IOException
freemarker.template.TemplateExceptionprotected boolean isUpToDate(java.io.File artifactDir)
artifactDir - The artifact directory.
protected void prettyPrint(java.io.File file)
file - The file to pretty-print.protected freemarker.template.ObjectWrapper getObjectWrapper()
FreemarkerDeploymentModule
getObjectWrapper in class FreemarkerDeploymentModulepublic org.apache.commons.digester.RuleSet getConfigurationRules()
BasicDeploymentModule
getConfigurationRules in interface DeploymentModulegetConfigurationRules in class BasicDeploymentModulepublic Validator getValidator()
DeploymentModule
getValidator in interface DeploymentModulegetValidator in class BasicDeploymentModulepublic void setPrettyPrint(boolean prettyPrint)
prettyPrint - Whether to pretty-print the xml.public void setValidateSchemas(boolean validateSchemas)
validateSchemas - Whether to validate the generated schemas in an attempt to catch possible errors that enunciate might have missed.public void setInlineWSDLSchemas(boolean inlineWSDLSchemas)
inlineWSDLSchemas - Whether to inline the WSDL schemas.public boolean isDisableWadl()
public void setDisableWadl(boolean disableWadl)
disableWadl - Whether to disable the WADL.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||