org.nuiton.jaxx
Class JaxxHelpGeneratorMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.jaxx.AbstractJaxxMojo
          extended by org.nuiton.jaxx.JaxxHelpGeneratorMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class JaxxHelpGeneratorMojo
extends AbstractJaxxMojo

Mojo to generate javax help stuff for your project. HelpIds should have been discovered by the JaxxMojo.

Since:
1.3
Author:
chemit

Field Summary
protected  java.io.File contentTemplate
          The template used to generate helpset content file.
protected  java.util.Properties helpIds
          The help ids discovered by Jaxx compilation
protected  java.lang.String helpsetFileName
          The file name of the helpset to generate.
protected  java.io.File helpSetTemplate
          The template used to generate helpset file.
protected  java.io.File i18nTemplate
          The template used to generate helpset content file.
protected  java.lang.String i8nFileName
          The file name of the i18n java file to generate.
protected  java.lang.String indexFileName
          The file name of the helpset index to generate.
protected  java.io.File indexTemplate
          The template used to generate helpset index file.
protected  java.lang.String locale
          The locale to generate for help.
protected  java.lang.String mapFileName
          The file name of the helpset map to generate.
protected  java.io.File mapTemplate
          The template used to generate helpset map file.
protected  java.lang.String packageName
          The package where to generate i18n java file.
protected  java.io.File target
          The directory where to generate javaHelp skeleton files.
protected  java.lang.String tocFileName
          The file name of the helpset toc to generate.
protected  java.io.File tocTemplate
          The template used to generate helpset toc file.
 
Fields inherited from class org.nuiton.jaxx.AbstractJaxxMojo
cl, helpIdStore, helpsetI18nPrefix, helpsetIndexI18nSuffix, helpSetName, helpsetTitleI18nSuffix, helpsetTocI18nSuffix, i18nable, outJava, project, skip, verbose
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
JaxxHelpGeneratorMojo()
           
 
Method Summary
protected  void checkResource(java.io.File f)
           
 void doAction()
           
protected  void doGen(java.io.File template, java.io.File f, java.util.Properties env)
           
protected  boolean generateHelSetFile(java.io.File file, java.util.Properties env)
           
protected  void generateI18nFile(java.io.File file, java.util.Properties env, java.util.Properties mergedHelpIds, NodeItem indexRootItem, NodeItem tocRootItem)
           
protected  NodeItem generateIndexFile(java.io.File file, java.util.Properties env)
           
protected  java.util.Properties generateMapFile(java.io.File file, java.util.Properties env)
           
protected  NodeItem generateTocFile(java.io.File file, java.util.Properties env)
           
protected  java.util.Properties getExistingHelpIds(java.io.File file)
           
protected  NodeItem getExistingItems(java.lang.String tagName, java.io.File file)
           
protected  java.net.URL getTemplate(java.io.File f)
           
 void init()
           
protected  TemplateGenerator prepareGenerator(java.io.File template)
           
 
Methods inherited from class org.nuiton.jaxx.AbstractJaxxMojo
execute
 
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, toString, wait, wait, wait
 

Field Detail

target

protected java.io.File target
The directory where to generate javaHelp skeleton files.

Is required if generateHelp is on.

Since:
1.3

locale

protected java.lang.String locale
The locale to generate for help. By default, stay in France.

Since:
1.3

packageName

protected java.lang.String packageName
The package where to generate i18n java file.

Since:
1.3

helpsetFileName

protected java.lang.String helpsetFileName
The file name of the helpset to generate.

Since:
1.3

mapFileName

protected java.lang.String mapFileName
The file name of the helpset map to generate.

Since:
1.3

indexFileName

protected java.lang.String indexFileName
The file name of the helpset index to generate.

Since:
1.3

tocFileName

protected java.lang.String tocFileName
The file name of the helpset toc to generate.

Since:
1.3

i8nFileName

protected java.lang.String i8nFileName
The file name of the i18n java file to generate.

Since:
1.3

helpSetTemplate

protected java.io.File helpSetTemplate
The template used to generate helpset file. Must be an existing file or a ressource in classp-ath

Since:
1.3

mapTemplate

protected java.io.File mapTemplate
The template used to generate helpset map file. Must be an existing file or a ressource in classp-ath

Since:
1.3

indexTemplate

protected java.io.File indexTemplate
The template used to generate helpset index file. Must be an existing file or a ressource in classp-ath

Since:
1.3

tocTemplate

protected java.io.File tocTemplate
The template used to generate helpset toc file. Must be an existing file or a ressource in classp-ath

Since:
1.3

contentTemplate

protected java.io.File contentTemplate
The template used to generate helpset content file. Must be an existing file or a ressource in classp-ath

Since:
1.3

i18nTemplate

protected java.io.File i18nTemplate
The template used to generate helpset content file. Must be an existing file or a ressource in classp-ath

Since:
1.3

helpIds

protected java.util.Properties helpIds
The help ids discovered by Jaxx compilation

Constructor Detail

JaxxHelpGeneratorMojo

public JaxxHelpGeneratorMojo()
Method Detail

init

public void init()
          throws java.lang.Exception
Specified by:
init in class AbstractJaxxMojo
Throws:
java.lang.Exception

doAction

public void doAction()
              throws java.lang.Exception
Specified by:
doAction in class AbstractJaxxMojo
Throws:
java.lang.Exception

generateI18nFile

protected void generateI18nFile(java.io.File file,
                                java.util.Properties env,
                                java.util.Properties mergedHelpIds,
                                NodeItem indexRootItem,
                                NodeItem tocRootItem)
                         throws java.lang.Exception
Throws:
java.lang.Exception

generateHelSetFile

protected boolean generateHelSetFile(java.io.File file,
                                     java.util.Properties env)
                              throws java.lang.Exception
Throws:
java.lang.Exception

generateMapFile

protected java.util.Properties generateMapFile(java.io.File file,
                                               java.util.Properties env)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

generateIndexFile

protected NodeItem generateIndexFile(java.io.File file,
                                     java.util.Properties env)
                              throws java.lang.Exception
Throws:
java.lang.Exception

generateTocFile

protected NodeItem generateTocFile(java.io.File file,
                                   java.util.Properties env)
                            throws java.lang.Exception
Throws:
java.lang.Exception

doGen

protected void doGen(java.io.File template,
                     java.io.File f,
                     java.util.Properties env)
              throws java.lang.Exception
Throws:
java.lang.Exception

prepareGenerator

protected TemplateGenerator prepareGenerator(java.io.File template)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getTemplate

protected java.net.URL getTemplate(java.io.File f)
                            throws java.io.IOException
Throws:
java.io.IOException

checkResource

protected void checkResource(java.io.File f)
                      throws org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoFailureException

getExistingHelpIds

protected java.util.Properties getExistingHelpIds(java.io.File file)
                                           throws org.xml.sax.SAXException,
                                                  java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

getExistingItems

protected NodeItem getExistingItems(java.lang.String tagName,
                                    java.io.File file)
                             throws org.xml.sax.SAXException,
                                    java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException


Copyright © 2008-2009 CodeLutin. All Rights Reserved.