|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.spicefactory.pimento.generator.ant.AbstractCinnamonGeneratorTask
public abstract class AbstractCinnamonGeneratorTask
Abstract base class for Ant Task that generates AS3 source code for service interfaces
and proxies and Parsley XML configuration files. The two concrete implementations are
SpringGeneratorTask for setups that use Spring for configuration
and CinnamonGeneratorTask for Cinnamon's custom XML configuration format.
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.Task |
|---|
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
AbstractCinnamonGeneratorTask()
|
|
| Method Summary | |
|---|---|
void |
addAs3SourceGenerator(SourceGeneratorSettings settings)
Adds the settings for generating AS3 service interfaces and proxies. |
void |
addPackageMapping(Mapping mapping)
Adds a mapping that maps Java package names to AS3 package names. |
void |
addParsleyConfigGenerator(ConfigGeneratorSettings settings)
Adds the settings for generating the Parsley XML configuration file. |
void |
addTypeMapping(Mapping mapping)
Adds a mapping that maps Java class names to AS3 class names. |
protected abstract ConfigurationBuilder |
createConfigurationBuilder(File configFile)
Creates the ConfigurationBuilder implementation this Ant Task should use. |
void |
execute()
|
void |
setConfigFile(File configFile)
Sets the Cinnamon configuration file. |
void |
setNamingStrategy(String namingStrategy)
Sets the naming strategy to use for generating class names for proxies from the names of the service interfaces. |
void |
setTemplateDir(File templateDir)
Sets the directory where all FreeMarker templates used by this Task are located. |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCinnamonGeneratorTask()
| Method Detail |
|---|
public void setConfigFile(File configFile)
configMode property. If the value is spring this
file must be a Spring configuration file, otherwise it has to be Cinnamons own XML format.
configFile - the Cinnamon configuration file.public void setTemplateDir(File templateDir)
interface.ftl,
implementation.ftl and configuration.ftl.
templateDir - the directory where all FreeMarker templates used by this Task are locatedpublic void setNamingStrategy(String namingStrategy)
namingStrategy - the naming strategy to usepublic void addAs3SourceGenerator(SourceGeneratorSettings settings)
settings - the settings for generating AS3 service interfaces and proxiespublic void addParsleyConfigGenerator(ConfigGeneratorSettings settings)
settings - the settings for generating the Parsley XML configuration filepublic void addPackageMapping(Mapping mapping)
mapping - a mapping that maps Java package names to AS3 package namespublic void addTypeMapping(Mapping mapping)
mapping - a mapping that maps Java class names to AS3 class names
public void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildExceptionprotected abstract ConfigurationBuilder createConfigurationBuilder(File configFile)
There are two builtin implementation: SpringConfigurationBuilder which
uses a Spring ApplicationContext for configuration and
XmlConfigurationParser which processes Cinnamon's own custom XML
configuration format.
configFile - the file to load the configuration from
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||