|
|||||||||
| 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.c.CDeploymentModule
public class CDeploymentModule
The C module generates C data structures and (de)serialization functions that can be used in conjunction with libxml2 to (de)serialize the REST resources as they are represented as XML data.
The order of the C deployment module is 0, as it doesn't depend on any artifacts exported by any other module.
The C module is configured with the "c" element under the "modules" element of the enunciate configuration file. It supports the following attributes:
| Field Summary |
|---|
| Fields inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
enunciate |
| Constructor Summary | |
|---|---|
CDeploymentModule()
|
|
| Method Summary | |
|---|---|
void |
doFreemarkerGenerate()
Generate using Freemarker. |
org.apache.commons.digester.RuleSet |
getConfigurationRules()
Default implementation returns null. |
java.lang.String |
getEnumConstantNamePattern()
The pattern for converting an enum constant to a unique C-style type name. |
java.lang.String |
getLabel()
The label for the C API. |
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.lang.String |
getSourceFileName()
The name of the generated Ruby source file. |
protected java.net.URL |
getTemplateURL(java.lang.String template)
Get a template URL for the template of the given name. |
java.lang.String |
getTypeDefinitionNamePattern()
The pattern for converting a type definition to a unique C-style type name. |
Validator |
getValidator()
Get the validator for this module, or null if none. |
boolean |
isDisabled()
Whether this deployment module has been disabled, e.g. |
boolean |
isForceEnable()
Whether to require this module (force-enable it). |
boolean |
isSeparateCommonCode()
Whether to separate the common code from the project-specific code. |
protected java.lang.String |
readResource(java.lang.String resource)
Reads a resource into string form. |
static java.lang.String |
scrubIdentifier(java.lang.String identifier)
Scrub a C identifier (removing any illegal characters, etc.). |
void |
setEnumConstantNamePattern(java.lang.String enumConstantNamePattern)
The pattern for converting an enum constant to a unique C-style type name. |
void |
setForceEnable(boolean forceEnable)
Whether to require this module (force-enable it). |
void |
setLabel(java.lang.String label)
The label for the C API. |
void |
setSeparateCommonCode(boolean separateCommonCode)
Whether to separate the common code from the project-specific code. |
void |
setTypeDefinitionNamePattern(java.lang.String typeDefinitionNamePattern)
The pattern for converting a type definition to a unique C-style type name. |
| Methods inherited from class org.codehaus.enunciate.modules.FreemarkerDeploymentModule |
|---|
close, doGenerate, getConfiguration, getModel, getModelInternal, getTemplateExceptionHandler, getTemplateLoader, initModel, 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, 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 CDeploymentModule()
| Method Detail |
|---|
public java.lang.String getName()
DeploymentModule
getName in interface DeploymentModulegetName in class BasicDeploymentModulepublic static java.lang.String scrubIdentifier(java.lang.String identifier)
identifier - The identifier.
public void doFreemarkerGenerate()
throws java.io.IOException,
freemarker.template.TemplateException,
EnunciateException
FreemarkerDeploymentModuleFreemarkerDeploymentModule.doGenerate() but can throw a TemplateException.
doFreemarkerGenerate in class FreemarkerDeploymentModulejava.io.IOException
freemarker.template.TemplateException
EnunciateException
protected java.lang.String readResource(java.lang.String resource)
throws java.io.IOException,
EnunciateException
resource - The resource to read.
java.io.IOException
EnunciateExceptionprotected java.lang.String getSourceFileName()
protected freemarker.template.ObjectWrapper getObjectWrapper()
FreemarkerDeploymentModule
getObjectWrapper in class FreemarkerDeploymentModuleprotected java.net.URL getTemplateURL(java.lang.String template)
template - The specified template.
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label - The label for the C API.public java.lang.String getTypeDefinitionNamePattern()
public void setTypeDefinitionNamePattern(java.lang.String typeDefinitionNamePattern)
typeDefinitionNamePattern - The pattern for converting a type definition to a unique C-style type name.public java.lang.String getEnumConstantNamePattern()
public void setEnumConstantNamePattern(java.lang.String enumConstantNamePattern)
enumConstantNamePattern - The pattern for converting an enum constant to a unique C-style type name.public boolean isForceEnable()
public void setForceEnable(boolean forceEnable)
forceEnable - Whether to require this module (force-enable it).public boolean isSeparateCommonCode()
public void setSeparateCommonCode(boolean separateCommonCode)
separateCommonCode - Whether to separate the common code from the project-specific code.public org.apache.commons.digester.RuleSet getConfigurationRules()
BasicDeploymentModule
getConfigurationRules in interface DeploymentModulegetConfigurationRules in class BasicDeploymentModulepublic Validator getValidator()
DeploymentModule
getValidator in interface DeploymentModulegetValidator in class BasicDeploymentModulepublic boolean isDisabled()
DeploymentModule
isDisabled in interface DeploymentModuleisDisabled in class BasicDeploymentModule
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||