public abstract class BundleWriter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BundleWriter.FileType |
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
allowedLocales |
protected String |
configFile |
protected MBBundle |
currentBundle |
protected boolean |
deleteOldFiles |
protected BundleWriter.FileType |
fileType |
protected boolean |
flexLayout |
protected List<String> |
myUsedLocales |
protected String |
outputPath |
protected boolean |
overwrite |
protected org.apache.tools.ant.Task |
task |
| Constructor and Description |
|---|
BundleWriter(org.apache.tools.ant.Task task,
String configFile,
MBBundle currentBundle,
String outputPath,
BundleWriter.FileType fileType,
Set<String> allowedLocales) |
| Modifier and Type | Method and Description |
|---|---|
protected StringBuilder |
buildOutputFileNameBase() |
protected StringBuilder |
buildOutputFileNameBase(String locale) |
protected Properties |
createProperties(String locale,
boolean merged) |
protected void |
deleteFiles() |
protected void |
deleteFiles(String filePattern) |
void |
execute() |
protected MBBundle |
getCurrentBundle() |
protected String |
getFileName(String locale) |
protected String |
getFileNameFlex(String locale) |
protected String |
getFileNameJava(String locale) |
protected List<String> |
getLocalesUsed() |
String |
getOutputPath()
the root path to store the files
|
protected String |
getOutputPathName() |
boolean |
isFlexLayout() |
protected boolean |
mkdirs(String file) |
protected boolean |
needsNewFiles()
true when generation is neccessary, false when up-to-date
|
void |
setDebugMode(boolean debugMode) |
void |
setDeleteOldFiles(boolean deleteOldFiles) |
void |
setFlexLayout(boolean flexLayout) |
void |
setOverwrite(boolean overwrite) |
protected abstract String |
suffix() |
protected void |
writeOutputFilePerLocale(String locale) |
protected void |
writeOutputFiles()
generate the current bundle's property files
|
protected final org.apache.tools.ant.Task task
protected final MBBundle currentBundle
protected final String configFile
protected final String outputPath
protected final BundleWriter.FileType fileType
protected boolean overwrite
protected boolean deleteOldFiles
protected boolean flexLayout
public void setOverwrite(boolean overwrite)
public void setDebugMode(boolean debugMode)
public void setDeleteOldFiles(boolean deleteOldFiles)
public boolean isFlexLayout()
public void setFlexLayout(boolean flexLayout)
protected boolean mkdirs(String file)
protected void writeOutputFiles()
throws Exception
Exceptionprotected void writeOutputFilePerLocale(String locale) throws Exception
Exceptionprotected void deleteFiles()
protected StringBuilder buildOutputFileNameBase()
protected StringBuilder buildOutputFileNameBase(String locale)
protected void deleteFiles(String filePattern)
protected boolean needsNewFiles()
throws FileNotFoundException
FileNotFoundExceptionprotected String getOutputPathName()
protected abstract String suffix()
public String getOutputPath()
protected List<String> getLocalesUsed()
protected MBBundle getCurrentBundle()
protected Properties createProperties(String locale, boolean merged)
locale - merged - - merged: also include properties from parent-bundles (true), only own properties (false)Copyright © 2015. All rights reserved.