|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.i18n.plugin.AbstractI18nMojo
org.nuiton.i18n.plugin.parser.AbstractI18nParserMojo
public abstract class AbstractI18nParserMojo
Abstract implementation for parsing goal.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin |
|---|
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging |
| Field Summary | |
|---|---|
protected boolean |
backupGetter
Flag to save previous getter in a backup before doing parsing. |
protected File |
cp
Build directory (used to know if files in sources are up-to-date). |
protected I18nSourceEntry[] |
entries
Source entries (src+includes+excludes) to process. |
protected boolean |
force
To force reparse of all sources. |
protected boolean |
keysModifier
Deprecated. since 1.2, will no more used |
protected org.nuiton.io.SortedProperties |
oldLanguage
|
protected org.nuiton.io.SortedProperties |
oldParser
|
protected boolean |
showTouchedFiles
Flag to display touched files while parsing. |
protected long |
t0
|
protected boolean |
treateDefaultEntry
To treate default entry offered by the mojo. |
| Fields inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo |
|---|
artifactId, bundles, encoding, genSrc, locales, out, project, silent, src, strictMode, verbose |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractI18nParserMojo()
|
|
| Method Summary | |
|---|---|
protected void |
addDefaultEntry()
Add the default entry to entries given in configuration. |
protected void |
doAction()
|
protected abstract File |
getDefaultBasedir()
|
protected abstract String[] |
getDefaultExcludes()
|
protected abstract String[] |
getDefaultIncludes()
|
protected abstract String |
getKeyModifierEnd()
Deprecated. since 1.2, no more used, incompatible with multi-threading parsing |
protected abstract String |
getKeyModifierStart()
Deprecated. since 1.2, no more used, incompatible with multi-threading parsing |
static String |
getLogEntry(String msg,
int nbFiles,
long time,
long all)
Construit une chaine de log formatée. |
protected abstract String |
getOutGetter()
|
org.nuiton.io.SortedProperties |
getResult()
|
void |
init()
|
boolean |
isForce()
|
boolean |
isShowTouchedFiles()
|
boolean |
isStrictMode()
|
abstract FileParser |
newFileParser()
|
abstract org.nuiton.io.FileUpdater |
newFileUpdater(SourceEntry entry)
|
protected boolean |
onEnterEntry(I18nSourceEntry entry)
|
protected void |
saveGetterFile()
Save the result in the getter file. |
| Methods inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo |
|---|
addGetter, backupFile, checkBundle, checkPackaging, getArtifactId, getBackupFile, getEncoding, getGetterFile, getI18nFile, getProject, isSilent, isVerbose, needGeneration, setEncoding, setProject, setVerbose |
| Methods inherited from class org.nuiton.plugin.AbstractPlugin |
|---|
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, checkEncoding, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, 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.nuiton.i18n.plugin.parser.I18nParserConfiguration |
|---|
getLog, isSilent, isVerbose |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
|---|
execute, getLog, setLog |
| Field Detail |
|---|
protected File cp
@Deprecated protected boolean keysModifier
protected boolean treateDefaultEntry
protected I18nSourceEntry[] entries
protected boolean showTouchedFiles
true if AbstractI18nMojo.verbose is
set at true.
protected boolean backupGetter
protected boolean force
protected org.nuiton.io.SortedProperties oldParser
protected org.nuiton.io.SortedProperties oldLanguage
protected long t0
| Constructor Detail |
|---|
public AbstractI18nParserMojo()
| Method Detail |
|---|
protected abstract String getOutGetter()
@Deprecated protected abstract String getKeyModifierStart()
@Deprecated protected abstract String getKeyModifierEnd()
protected abstract String[] getDefaultIncludes()
protected abstract String[] getDefaultExcludes()
protected abstract File getDefaultBasedir()
public abstract FileParser newFileParser()
public abstract org.nuiton.io.FileUpdater newFileUpdater(SourceEntry entry)
entry - the incoming source entry to attach to the file updater
public boolean isStrictMode()
isStrictMode in class AbstractI18nMojopublic boolean isForce()
public void init()
throws Exception
init in class AbstractI18nMojoExceptionprotected boolean onEnterEntry(I18nSourceEntry entry)
protected void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginExceptionpublic boolean isShowTouchedFiles()
isShowTouchedFiles in interface I18nParserConfigurationpublic org.nuiton.io.SortedProperties getResult()
getResult in interface I18nParserConfigurationprotected void addDefaultEntry()
protected void saveGetterFile()
throws IOException
IOException - if any io pb
public static String getLogEntry(String msg,
int nbFiles,
long time,
long all)
msg - le prefix du messagenbFiles - le nombre de fichiers actuellement traitéstime - le time de traitement de ce fichierall - le temps de traitement de tous les fichiers
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||