|
||||||||||
| 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.ruby.RubyDeploymentModule
public class RubyDeploymentModule
The Ruby module generates Ruby data types that can be used in conjunction with the Ruby JSON implementation to (de)serialize the REST resources as they are represented as JSON data.
The order of the Ruby deployment module is 0, as it doesn't depend on any artifacts exported by any other module.
The Ruby module is configured with the "ruby" element under the "modules" element of the enunciate configuration file. It supports the following attributes:
The "package-conversions" subelement of the "ruby" element is used to map packages from the original API packages to Ruby 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 | |
|---|---|
RubyDeploymentModule()
|
|
| 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. |
void |
doFreemarkerGenerate()
|
protected boolean |
existsAnyJsonResourceMethod(List<RootResource> rootResources)
Whether any root resources exist that produce json. |
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 Ruby 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 Ruby 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 Ruby module. |
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 Ruby module. |
void |
setLabel(String label)
The label for the Ruby API. |
| 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 RubyDeploymentModule()
| 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 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 Ruby module.public String getLabel()
public void setLabel(String label)
label - The label for the Ruby 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 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 | |||||||||