org.nuiton.jaxx.plugin
Class AbstractGenerateHelpMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.plugin.AbstractPlugin
          extended by org.nuiton.jaxx.plugin.AbstractJaxxMojo
              extended by org.nuiton.jaxx.plugin.AbstractGenerateHelpMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.nuiton.plugin.Plugin, org.nuiton.plugin.PluginWithEncoding
Direct Known Subclasses:
GenerateHelpFilesMojo, GenerateHelpIdsMojo, GenerateHelpMojo, GenerateHelpSearchMojo

public abstract class AbstractGenerateHelpMojo
extends AbstractJaxxMojo

Abstract Mojo to generate help stuff.

Since:
2.0.0
Author:
tchemit

Nested Class Summary
 
Nested classes/interfaces inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
AbstractJaxxMojo.JaxxFileUpdater
 
Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging
 
Field Summary
protected  boolean generateSearch
          Flag to generate the search index.
protected  String locales
          The locales to generate for help, separeted by comma.
 
Fields inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
generateHelp
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractGenerateHelpMojo()
           
 
Method Summary
protected  boolean checkSkip()
           
protected  void cleanHelpIdsStore()
           
protected  void doAction()
           
protected abstract  void doActionForLocale(Locale locale, boolean isDefaultLocale, File source, String localePath)
          Do the action for the given locale.
 String getHelpIdsFilename()
           
 File getHelpIdsStoreFile()
           
 String getMergeHelpIdsFilename()
           
 File getMergeHelpIdsStoreFile()
           
 File getOutputHelpIds()
           
protected  void init()
           
protected  Set<String> loadHelpIds(File file)
           
protected abstract  void postDoAction()
          Call back after doing all stuff for all locales declared
protected  String removeQuote(String txt)
           
 void setHelpIdsFilename(String helpIdsFilename)
           
 void setMergeHelpIdsFilename(String mergeHelpIdsFilename)
           
 void setOutputHelpIds(File outputHelpIds)
           
protected  void storeHelpIds(File file, Set<String> ids)
           
 
Methods inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
checkPackaging, getEncoding, getLastModified, getProject, getTargetDirectory, isForce, isVerbose, setEncoding, setForce, setProject, setTargetDirectory, setVerbose
 
Methods inherited from class org.nuiton.plugin.AbstractPlugin
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute, getLog, setLog
 

Field Detail

locales

protected String locales
The locales to generate for help, separeted by comma.

The first locale given is the default locale.

Since:
2.0.0
Is defined by:
expression:
${jaxx.locales}
Is required.

generateSearch

protected boolean generateSearch
Flag to generate the search index.

Since:
1.3
Is defined by:
expression:
${jaxx.generateSearch}
default-value:
true
Is required.
Constructor Detail

AbstractGenerateHelpMojo

public AbstractGenerateHelpMojo()
Method Detail

doActionForLocale

protected abstract void doActionForLocale(Locale locale,
                                          boolean isDefaultLocale,
                                          File source,
                                          String localePath)
                                   throws Exception
Do the action for the given locale.

Parameters:
locale - the locale to treate
isDefaultLocale - true if given locale is de the default locale
source - where are stored help files for the given locale
localePath - the locale path to use (is default if given locale is default).
Throws:
Exception - if any pb

postDoAction

protected abstract void postDoAction()
Call back after doing all stuff for all locales declared


init

protected void init()
             throws Exception
Specified by:
init in class org.nuiton.plugin.AbstractPlugin
Throws:
Exception

checkSkip

protected boolean checkSkip()
Overrides:
checkSkip in class org.nuiton.plugin.AbstractPlugin

doAction

protected void doAction()
                 throws Exception
Specified by:
doAction in class org.nuiton.plugin.AbstractPlugin
Throws:
Exception

getOutputHelpIds

public File getOutputHelpIds()

setOutputHelpIds

public void setOutputHelpIds(File outputHelpIds)

getHelpIdsStoreFile

public File getHelpIdsStoreFile()

getMergeHelpIdsStoreFile

public File getMergeHelpIdsStoreFile()

getHelpIdsFilename

public String getHelpIdsFilename()

setHelpIdsFilename

public void setHelpIdsFilename(String helpIdsFilename)

getMergeHelpIdsFilename

public String getMergeHelpIdsFilename()

setMergeHelpIdsFilename

public void setMergeHelpIdsFilename(String mergeHelpIdsFilename)

cleanHelpIdsStore

protected void cleanHelpIdsStore()
                          throws IOException
Throws:
IOException

loadHelpIds

protected Set<String> loadHelpIds(File file)
                           throws IOException
Throws:
IOException

storeHelpIds

protected void storeHelpIds(File file,
                            Set<String> ids)
                     throws IOException
Throws:
IOException

removeQuote

protected String removeQuote(String txt)


Copyright © 2008-2011 CodeLutin. All Rights Reserved.