|
|||||||||
| 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.objc.ObjCDeploymentModule
public class ObjCDeploymentModule
The Objective C module generates Objective C classes 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 Objective C deployment module is 0, as it doesn't depend on any artifacts exported by any other module.
The Objective C module is configured with the "obj-c" element under the "modules" element of the enunciate configuration file. It supports the following attributes:
In addition to the attributes specified above, the Objective C module configuration supports an arbitrary number of "package" child elements, used to explicitly assign package identifiers to each package. The "package" child element supports a "name" attribute (used to name the package) and an "identifier" attribute.
| Field Summary |
|---|
| Fields inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
enunciate |
| Constructor Summary | |
|---|---|
ObjCDeploymentModule()
|
|
| Method Summary | |
|---|---|
void |
addPackageIdentifier(PackageIdentifier conversion)
Add a client package conversion. |
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 Ruby API. |
java.lang.String |
getName()
The name of the deployment module. |
protected freemarker.template.ObjectWrapper |
getObjectWrapper()
The object wrapper to use for the model. |
java.lang.String |
getPackageIdentifierPattern()
The format string creating a package identifier from a package name. |
java.util.Map<java.lang.String,java.lang.String> |
getPackageIdentifiers()
The package-to-module conversions. |
protected java.net.URL |
getTemplateURL(java.lang.String template)
Get a template URL for the template of the given name. |
java.lang.String |
getTranslateIdTo()
What to translate 'id' to when writing out objective-c code. |
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. |
void |
initModel(EnunciateFreemarkerModel model)
Initialize the model. |
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 Ruby API. |
void |
setPackageIdentifierPattern(java.lang.String packageIdentifierPattern)
The format string creating a package identifier from a package name. |
void |
setSeparateCommonCode(boolean separateCommonCode)
Whether to separate the common code from the project-specific code. |
void |
setTranslateIdTo(java.lang.String translateIdTo)
What to translate 'id' to when writing out objective-c 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, 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 ObjCDeploymentModule()
| 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 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,
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 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 Ruby API.public java.util.Map<java.lang.String,java.lang.String> getPackageIdentifiers()
public void addPackageIdentifier(PackageIdentifier conversion)
conversion - The conversion to add.public java.lang.String getPackageIdentifierPattern()
public void setPackageIdentifierPattern(java.lang.String packageIdentifierPattern)
packageIdentifierPattern - The format string creating a package identifier from a package name.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 java.lang.String getTranslateIdTo()
public void setTranslateIdTo(java.lang.String translateIdTo)
translateIdTo - What to translate 'id' to when writing out objective-c code.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 | ||||||||