Package org.nuiton.jaxx.plugin
Class AbstractGenerateHelpMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.jaxx.plugin.AbstractJaxxMojo
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:
- Tony Chemit - chemit@codelutin.com
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
AbstractJaxxMojo.JaxxFileUpdaterNested classes/interfaces inherited from interface org.nuiton.plugin.Plugin
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging -
Field Summary
Fields Modifier and Type Field Description protected booleangenerateSearchFlag to generate the search index.protected java.lang.StringlocalesThe locales to generate for help, separeted by comma.Fields inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
generateHelpFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors Constructor Description AbstractGenerateHelpMojo() -
Method Summary
Modifier and Type Method Description protected booleancheckSkip()protected voidcleanHelpIdsStore()protected voiddoAction()protected abstract voiddoActionForLocale(java.util.Locale locale, boolean isDefaultLocale, java.io.File source, java.lang.String localePath)Do the action for the given locale.java.lang.StringgetHelpIdsFilename()java.io.FilegetHelpIdsStoreFile()java.lang.StringgetMergeHelpIdsFilename()java.io.FilegetMergeHelpIdsStoreFile()java.io.FilegetOutputHelpIds()protected voidinit()protected java.util.Set<java.lang.String>loadHelpIds(java.io.File file)protected abstract voidpostDoAction()Call back after doing all stuff for all locales declaredprotected abstract voidpreDoAction()Call back before doing all stuff for all locales declaredprotected java.lang.StringremoveQuote(java.lang.String txt)voidsetHelpIdsFilename(java.lang.String helpIdsFilename)voidsetMergeHelpIdsFilename(java.lang.String mergeHelpIdsFilename)voidsetOutputHelpIds(java.io.File outputHelpIds)protected voidstoreHelpIds(java.io.File file, java.util.Set<java.lang.String> ids)Methods inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
checkPackaging, getEncoding, getLastModified, getProject, getTargetDirectory, isForce, isVerbose, setEncoding, setForce, setProject, setTargetDirectory, setVerboseMethods 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, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFileMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute, getLog, setLog
-
Field Details
-
locales
@Parameter(property="jaxx.locales", required=true) protected java.lang.String localesThe locales to generate for help, separeted by comma. The first locale given is the default locale.- Since:
- 2.0.0
-
generateSearch
@Parameter(property="jaxx.generateSearch", defaultValue="true", required=true) protected boolean generateSearchFlag to generate the search index.- Since:
- 1.3
-
-
Constructor Details
-
AbstractGenerateHelpMojo
public AbstractGenerateHelpMojo()
-
-
Method Details
-
doActionForLocale
protected abstract void doActionForLocale(java.util.Locale locale, boolean isDefaultLocale, java.io.File source, java.lang.String localePath) throws java.lang.ExceptionDo the action for the given locale.- Parameters:
locale- the locale to treateisDefaultLocale-trueif given locale is de the default localesource- where are stored help files for the given localelocalePath- the locale path to use (isdefaultif given locale is default).- Throws:
java.lang.Exception- if any pb
-
postDoAction
protected abstract void postDoAction()Call back after doing all stuff for all locales declared -
preDoAction
protected abstract void preDoAction() throws java.io.IOExceptionCall back before doing all stuff for all locales declared- Throws:
java.io.IOException
-
init
protected void init() throws java.lang.Exception- Specified by:
initin classorg.nuiton.plugin.AbstractPlugin- Throws:
java.lang.Exception
-
checkSkip
protected boolean checkSkip()- Overrides:
checkSkipin classorg.nuiton.plugin.AbstractPlugin
-
doAction
protected void doAction() throws java.lang.Exception- Specified by:
doActionin classorg.nuiton.plugin.AbstractPlugin- Throws:
java.lang.Exception
-
getOutputHelpIds
public java.io.File getOutputHelpIds() -
setOutputHelpIds
public void setOutputHelpIds(java.io.File outputHelpIds) -
getHelpIdsStoreFile
public java.io.File getHelpIdsStoreFile() -
getMergeHelpIdsStoreFile
public java.io.File getMergeHelpIdsStoreFile() -
getHelpIdsFilename
public java.lang.String getHelpIdsFilename() -
setHelpIdsFilename
public void setHelpIdsFilename(java.lang.String helpIdsFilename) -
getMergeHelpIdsFilename
public java.lang.String getMergeHelpIdsFilename() -
setMergeHelpIdsFilename
public void setMergeHelpIdsFilename(java.lang.String mergeHelpIdsFilename) -
cleanHelpIdsStore
protected void cleanHelpIdsStore() throws java.io.IOException- Throws:
java.io.IOException
-
loadHelpIds
protected java.util.Set<java.lang.String> loadHelpIds(java.io.File file) throws java.io.IOException- Throws:
java.io.IOException
-
storeHelpIds
protected void storeHelpIds(java.io.File file, java.util.Set<java.lang.String> ids) throws java.io.IOException- Throws:
java.io.IOException
-
removeQuote
protected java.lang.String removeQuote(java.lang.String txt)
-