|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.appfuse.mojo.MojoBase
org.codehaus.mojo.appfuse.mojo.PojoMojoBase
public abstract class PojoMojoBase
This class will serve as a base class for all mojos that process java objects using freemarker and the hbm.xml file.
Field Summary |
---|
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
protected |
PojoMojoBase()
Creates a new PojoMojoBase object. |
Method Summary | |
---|---|
java.lang.String |
augmentFilePattern(java.lang.String inFilePattern)
This method takes the ant based file pattern and adds the proper suffix onto it for the type of processing the mojo needs to do. |
java.lang.String |
buildOutputPattern(java.lang.String inDefaultOutputPattern,
java.lang.String inOutputPatternPropertyKey,
java.lang.String inPackageName)
This method will build up the output pattern for a generated artifact. |
java.lang.String |
buildPackageName(java.lang.String inDefaultPackageExtension,
java.lang.String inPackageExtensionPropertyKey)
This method will create a full package name for an artifact based on the base package name and an extension and will return the full package name for the artifact. |
void |
execute()
This method will run the database conversion to hbm file mojo task. |
java.util.List |
getListOfFilesToProcess()
This method will use the file pattern or a default file pattern appended with a suffix specific to the mojo to locate all the files that need to be processed by the mojo. |
abstract java.lang.String |
getOutputPattern()
Getter for the file output pattern to be used when generating output files. |
java.lang.String |
getTemplateHelperClassName()
This class will locate the helper class to be used to provide additional support inside the template environment. |
protected abstract java.lang.String |
getTemplateName()
Getter for property template name to be used in processing the mojo. |
java.lang.String |
locateTemplate(java.lang.String inDefaultTemplateName,
java.lang.String inTemplatePropertyKey)
This method will look in the mojo properties to see if the user passed in a new template name and if so pass that back otherwise it passes the default back to the caller. |
java.lang.String |
toString()
toString methode: creates a String representation of the object |
protected abstract void |
validateProperties(java.util.Properties inProperties)
This method is called before properties are sent to the exporter for processing. |
Methods inherited from class org.codehaus.mojo.appfuse.mojo.MojoBase |
---|
getBasePackageName, getCopyOverWrite, getFilePattern, getModelDirectory, getModelPackageName, getMojoName, getOutputDirectory, getProcessingProperties, getSourceDirectory, setBasePackageName, setCopyOverWrite, setFilePattern, setModelDirectory, setMojoName, setOutputDirectory, setProcessingProperties, setSourceDirectory |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
---|
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected PojoMojoBase()
Method Detail |
---|
public void execute() throws org.apache.maven.plugin.MojoExecutionException
execute
in interface org.apache.maven.plugin.Mojo
execute
in class MojoBase
org.apache.maven.plugin.MojoExecutionException
- Thrown if we fail to obtain an appfuse resource.protected abstract void validateProperties(java.util.Properties inProperties)
inProperties
- The project properties that already have been populated.protected abstract java.lang.String getTemplateName()
public abstract java.lang.String getOutputPattern()
public java.lang.String locateTemplate(java.lang.String inDefaultTemplateName, java.lang.String inTemplatePropertyKey)
inDefaultTemplateName
- The name of the default template.inTemplatePropertyKey
- The key in the property map to look for a new template name possibly passed in by the user on the
maven properties.
public java.lang.String buildOutputPattern(java.lang.String inDefaultOutputPattern, java.lang.String inOutputPatternPropertyKey, java.lang.String inPackageName)
inDefaultOutputPattern
- The default output pattern for the artifact in question.inOutputPatternPropertyKey
- The property key to use to see if the user passed it in with the maven properties for the project.inPackageName
- The package name to prepend to the output pattern to construct the full location.
public java.lang.String buildPackageName(java.lang.String inDefaultPackageExtension, java.lang.String inPackageExtensionPropertyKey)
inDefaultPackageExtension
- The default package extension to use for this artifact.inPackageExtensionPropertyKey
- The key in the maven properties file where a user can override the default value.
public java.lang.String getTemplateHelperClassName()
public java.lang.String augmentFilePattern(java.lang.String inFilePattern)
inFilePattern
- The initial file pattern requested for processing.
public java.util.List getListOfFilesToProcess()
public java.lang.String toString()
toString
in class MojoBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |