|
|||||||||
| 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.csharp.CSharpDeploymentModule
public class CSharpDeploymentModule
The C# module generates C# client code for accessing the SOAP endpoints and makes an attempt at compiling the code in a .NET assembly. If the the compile attempt is to be successful, then you must have a C# compiler available on your system path, or specify a "compileExecutable" attribute in the Enunciate configuration file. If the compile attempt fails, only the C# source code will be made available as a client artifact.
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 "csharp" element under the "modules" element of the enunciate configuration file. It supports the following attributes:
The "package-conversions" subelement of the "csharp" element is used to map packages from the original API packages to C# namespaces. This element supports an arbitrary number of "convert" child elements that are used to specify the conversions. These "convert" elements support the following attributes:
| Field Summary |
|---|
| Fields inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
enunciate |
| Constructor Summary | |
|---|---|
CSharpDeploymentModule()
|
|
| Method Summary | |
|---|---|
void |
addClientPackageConversion(PackageNamespaceConversion conversion)
Add a client package conversion. |
protected void |
doBuild()
Default implementation is a no-op. |
protected void |
doCompile()
Default implementation is a no-op. |
void |
doFreemarkerGenerate()
Generate using Freemarker. |
protected java.lang.String |
getBundleFileName()
The name of the bundle file. |
java.lang.String |
getCompileCommand()
The C# compile command. |
java.lang.String |
getCompileExecutable()
The path to the compile executable. |
org.apache.commons.digester.RuleSet |
getConfigurationRules()
Default implementation returns null. |
protected java.lang.String |
getDLLFileName()
The name of the generated C# dll. |
protected java.lang.String |
getDocXmlFileName()
The name of the generated C# xml documentation. |
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. |
java.util.Map<java.lang.String,java.lang.String> |
getPackageToNamespaceConversions()
The package-to-namespace conversions. |
protected java.lang.String |
getSourceFileName()
The name of the generated C# source file. |
protected java.net.URL |
getTemplateURL(java.lang.String template)
Get a template URL for the template of the given name. |
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 |
isDisableCompile()
Whether to disable the compile step. |
boolean |
isDisabled()
Whether this deployment module has been disabled, e.g. |
boolean |
isRequire()
Whether to require the C# client code. |
boolean |
isSingleFilePerClass()
Whether there should be a single file per class. |
protected boolean |
isUpToDate(java.io.File genDir)
Whether the generate dir is up-to-date. |
protected java.lang.String |
packageToNamespace(java.lang.String pckg)
|
protected java.lang.String |
readResource(java.lang.String resource,
java.lang.String contains)
Reads a resource into string form. |
void |
setBundleFileName(java.lang.String bundleFileName)
The name of the bundle file. |
void |
setCompileCommand(java.lang.String compileCommand)
The C# compile command. |
void |
setCompileExecutable(java.lang.String compileExecutable)
The path to the compile executable. |
void |
setDisableCompile(boolean disableCompile)
Whether to disable the compile step. |
void |
setDLLFileName(java.lang.String DLLFileName)
The name of the generated C# dll. |
void |
setDocXmlFileName(java.lang.String docXmlFileName)
The name of the generated C# xml documentation. |
void |
setLabel(java.lang.String label)
The label for the C# API. |
void |
setRequire(boolean require)
Whether to require the C# client code. |
void |
setSingleFilePerClass(boolean singleFilePerClass)
Whether there should be a single file per class. |
void |
setSourceFileName(java.lang.String sourceFileName)
The name of the generated C# source file. |
| 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, doPackage, getAliases, getBuildDir, getCompileDir, getEnunciate, getGenerateDir, getOrder, getPackageDir, info, 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 CSharpDeploymentModule()
| Method Detail |
|---|
public java.lang.String getName()
DeploymentModule
getName in interface DeploymentModulegetName in class BasicDeploymentModule
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.protected java.lang.String packageToNamespace(java.lang.String pckg)
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.TemplateException
protected void doCompile()
throws EnunciateException,
java.io.IOException
BasicDeploymentModule
doCompile in class BasicDeploymentModuleEnunciateException
java.io.IOException
protected void doBuild()
throws EnunciateException,
java.io.IOException
BasicDeploymentModule
doBuild in class BasicDeploymentModuleEnunciateException
java.io.IOException
protected java.lang.String readResource(java.lang.String resource,
java.lang.String contains)
throws java.io.IOException,
EnunciateException
resource - The resource to read.contains - The description of what the bundle contains.
java.io.IOException
EnunciateExceptionprotected java.lang.String getBundleFileName()
public void setBundleFileName(java.lang.String bundleFileName)
bundleFileName - The name of the bundle file.protected java.lang.String getDLLFileName()
public void setDLLFileName(java.lang.String DLLFileName)
DLLFileName - The name of the generated C# dll.protected java.lang.String getDocXmlFileName()
public void setDocXmlFileName(java.lang.String docXmlFileName)
docXmlFileName - The name of the generated C# xml documentation.protected java.lang.String getSourceFileName()
public void setSourceFileName(java.lang.String sourceFileName)
sourceFileName - The name of the generated C# source file.protected freemarker.template.ObjectWrapper getObjectWrapper()
FreemarkerDeploymentModule
getObjectWrapper in class FreemarkerDeploymentModuleprotected java.net.URL getTemplateURL(java.lang.String template)
template - The specified template.
protected boolean isUpToDate(java.io.File genDir)
genDir - The generate dir.
public boolean isRequire()
public void setRequire(boolean require)
require - Whether to require the C# client code.public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label - The label for the C# API.public java.lang.String getCompileExecutable()
public void setCompileExecutable(java.lang.String compileExecutable)
compileExecutable - The path to the compile executable.public java.lang.String getCompileCommand()
public void setCompileCommand(java.lang.String compileCommand)
compileCommand - The C# compile command.public java.util.Map<java.lang.String,java.lang.String> getPackageToNamespaceConversions()
public boolean isDisableCompile()
public void setDisableCompile(boolean disableCompile)
disableCompile - Whether to disable the compile step.public boolean isSingleFilePerClass()
public void setSingleFilePerClass(boolean singleFilePerClass)
singleFilePerClass - Whether there should be a single file per class.public void addClientPackageConversion(PackageNamespaceConversion conversion)
conversion - The conversion to add.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 | ||||||||