|
||||||||||
| 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
public abstract class AbstractI18nMojo
Classe permettant d'obenir les parametres pendant les différentes phases du plugin.
| 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 String |
artifactId
Nom du projet. |
protected String |
bundles
Langues des bundles generes. |
protected String |
encoding
encoding a utiliser pour charger et sauver les bundles |
protected boolean |
genSrc
Met les fichiers generes dans le repertoire des sources i18n. |
protected Locale[] |
locales
les locales a traiter |
protected File |
out
Repertoire des fichiers generes i18n. |
protected org.apache.maven.project.MavenProject |
project
Dependance du projet. |
protected boolean |
silent
silent flag |
protected File |
src
Repertoire sources des fichiers i18n. |
protected boolean |
strictMode
ne conserve que les clef scannees (et donc traite tous les fichiers) Note : par default, on ne l'active car rescanne tous les fichiers. s |
protected boolean |
verbose
verbose flag Note: si non renseigne, on utilise la propiété maven.verbose. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractI18nMojo()
|
|
| Method Summary | |
|---|---|
protected void |
addGetter()
Prend en compte qu'un getter a été détecté. |
protected void |
backupFile(File f)
|
protected void |
checkBundle(Locale locale,
Properties propertiesOut,
boolean showEmpty)
|
protected boolean |
checkPackaging()
|
String |
getArtifactId()
|
File |
getBackupFile(File file)
|
String |
getEncoding()
|
File |
getGetterFile(File root,
String getter,
boolean create)
|
File |
getI18nFile(File root,
String artifactId,
Locale locale,
boolean create)
|
org.apache.maven.project.MavenProject |
getProject()
|
void |
init()
|
boolean |
isVerbose()
|
protected boolean |
needGeneration()
|
void |
setEncoding(String encoding)
|
void |
setProject(org.apache.maven.project.MavenProject project)
|
void |
setVerbose(boolean verbose)
|
| Methods inherited from class org.nuiton.plugin.AbstractPlugin |
|---|
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addTestResourceDir, addUrlToUrlsList, afterExecute, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, doAction, execute, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getTemplate, 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 |
|---|
getLog, setLog |
| Field Detail |
|---|
protected org.apache.maven.project.MavenProject project
protected String artifactId
protected String bundles
protected File src
protected File out
protected String encoding
protected boolean genSrc
protected boolean verbose
maven.verbose.
protected boolean silent
protected boolean strictMode
protected Locale[] locales
| Constructor Detail |
|---|
public AbstractI18nMojo()
| Method Detail |
|---|
protected boolean checkPackaging()
checkPackaging in class org.nuiton.plugin.AbstractPlugin
public void init()
throws Exception
init in class org.nuiton.plugin.AbstractPluginExceptionpublic String getArtifactId()
protected boolean needGeneration()
true si des getters ont etes enregistres pendant le
cycle de vie, false sinon.protected void addGetter()
public File getI18nFile(File root,
String artifactId,
Locale locale,
boolean create)
throws IOException
root - le repertoire ou sont stockes les fichiers i18nartifactId - le nom de l'artifactlocale - le nom du bundlecreate - true pour creer le fichier si non present
IOException - si probleme lors de la creation du fichier
public File getGetterFile(File root,
String getter,
boolean create)
throws IOException
root - le repertoire ou sont stockes les fichiers gettergetter - le nom du gettercreate - true pour creer le fichier si non present
IOException - si probleme lors de la creation du fichier
protected void checkBundle(Locale locale,
Properties propertiesOut,
boolean showEmpty)
public File getBackupFile(File file)
getBackupFile in class org.nuiton.plugin.AbstractPlugin
protected void backupFile(File f)
throws IOException
backupFile in class org.nuiton.plugin.AbstractPluginIOExceptionpublic String getEncoding()
public void setEncoding(String encoding)
public org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
public boolean isVerbose()
public void setVerbose(boolean verbose)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||