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 - dev@tchemit.fr
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
AbstractJaxxMojo.JaxxFileUpdater
-
-
Field Summary
Fields Modifier and Type Field Description protected booleangenerateSearchFlag to generate the search index.protected StringlocalesThe locales to generate for help, separeted by comma.-
Fields inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
generateHelp
-
-
Constructor Summary
Constructors Constructor Description AbstractGenerateHelpMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancheckSkip()protected voidcleanHelpIdsStore()protected voiddoAction()protected abstract voiddoActionForLocale(Locale locale, boolean isDefaultLocale, File source, String localePath)Do the action for the given locale.StringgetHelpIdsFilename()FilegetHelpIdsStoreFile()StringgetMergeHelpIdsFilename()FilegetMergeHelpIdsStoreFile()FilegetOutputHelpIds()protected voidinit()protected Set<String>loadHelpIds(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 StringremoveQuote(String txt)voidsetHelpIdsFilename(String helpIdsFilename)voidsetMergeHelpIdsFilename(String mergeHelpIdsFilename)voidsetOutputHelpIds(File outputHelpIds)protected voidstoreHelpIds(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, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
locales
@Parameter(property="jaxx.locales", required=true) protected 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
-
-
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 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:
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 IOExceptionCall back before doing all stuff for all locales declared- Throws:
IOException
-
init
protected void init() throws Exception- Specified by:
initin classorg.nuiton.plugin.AbstractPlugin- Throws:
Exception
-
checkSkip
protected boolean checkSkip()
- Overrides:
checkSkipin classorg.nuiton.plugin.AbstractPlugin
-
doAction
protected void doAction() throws Exception- Specified by:
doActionin classorg.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
-
-