|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.mojo.webstart.generator.AbstractGenerator
public abstract class AbstractGenerator
The abstract superclass for classes that generate the JNLP files produced by the various MOJOs available in the plugin.
| Constructor Summary | |
|---|---|
protected |
AbstractGenerator(org.apache.maven.project.MavenProject mavenProject,
File resourceLoaderPath,
String defaultTemplateResourceName,
File outputFile,
String inputFileTemplatePath,
String mainClass,
String webstartJarURL)
Creates a new AbstractGenerator. |
| Method Summary | |
|---|---|
protected org.apache.velocity.VelocityContext |
createAndPopulateContext()
Creates a Velocity context and populates it with replacement values for our pre-defined placeholders. |
void |
generate()
Generate the JNLP file. |
protected abstract String |
getDependenciesText()
Subclasses must implement this method to return the text that should replace the $dependencies placeholder in the JNLP template. |
protected String |
indentText(int level,
String text)
Add level space caracteres at the begin of each lines of the
given text. |
void |
setExtraConfig(GeneratorExtraConfig extraConfig)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractGenerator(org.apache.maven.project.MavenProject mavenProject,
File resourceLoaderPath,
String defaultTemplateResourceName,
File outputFile,
String inputFileTemplatePath,
String mainClass,
String webstartJarURL)
AbstractGenerator.
resourceLoaderPath - used to find the template in conjunction to inputFileTemplatePathoutputFile - The location of the file to be generated.inputFileTemplatePath - relative to resourceLoaderPathmainClass - The text that should replace the $mainClass placeholder in the JNLP template.
IllegalArgumentException - if any argument is null.| Method Detail |
|---|
public void setExtraConfig(GeneratorExtraConfig extraConfig)
public final void generate()
throws Exception
Exceptionprotected abstract String getDependenciesText()
protected org.apache.velocity.VelocityContext createAndPopulateContext()
protected String indentText(int level,
String text)
level space caracteres at the begin of each lines of the
given text.
level - the number of space caracteres to addtext - the text to prefix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||