de.viaboxx.nlstools.formats
Class BundleWriter
java.lang.Object
de.viaboxx.nlstools.formats.BundleWriter
- Direct Known Subclasses:
- BundleWriterExcel, BundleWriterFlexClass, BundleWriterJavaInterface, BundleWriterJson, BundleWriterProperties, BundleWriterSql
public abstract class BundleWriter
- extends Object
Description:
User: roman.stumm
Date: 15.06.2007
Time: 09:43:56
Copyright: Viaboxx GmbH
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
task
protected final org.apache.tools.ant.Task task
currentBundle
protected final MBBundle currentBundle
configFile
protected final String configFile
outputPath
protected final String outputPath
fileType
protected final BundleWriter.FileType fileType
overwrite
protected boolean overwrite
deleteOldFiles
protected boolean deleteOldFiles
flexLayout
protected boolean flexLayout
allowedLocales
protected Set<String> allowedLocales
myUsedLocales
protected List<String> myUsedLocales
BundleWriter
public BundleWriter(org.apache.tools.ant.Task task,
String configFile,
MBBundle currentBundle,
String outputPath,
BundleWriter.FileType fileType,
Set<String> allowedLocales)
execute
public void execute()
throws Exception
- Throws:
Exception
setOverwrite
public void setOverwrite(boolean overwrite)
setDebugMode
public void setDebugMode(boolean debugMode)
setDeleteOldFiles
public void setDeleteOldFiles(boolean deleteOldFiles)
isFlexLayout
public boolean isFlexLayout()
setFlexLayout
public void setFlexLayout(boolean flexLayout)
mkdirs
protected boolean mkdirs(String file)
writeOutputFiles
protected void writeOutputFiles()
throws Exception
- generate the current bundle's property files
- Throws:
Exception
writeOutputFilePerLocale
protected void writeOutputFilePerLocale(String locale)
throws Exception
- Throws:
Exception
deleteFiles
protected void deleteFiles()
buildOutputFileNameBase
protected StringBuilder buildOutputFileNameBase()
buildOutputFileNameBase
protected StringBuilder buildOutputFileNameBase(String locale)
deleteFiles
protected void deleteFiles(String filePattern)
needsNewFiles
protected boolean needsNewFiles()
throws FileNotFoundException
- true when generation is neccessary, false when up-to-date
- Throws:
FileNotFoundException
getOutputPathName
protected String getOutputPathName()
getFileName
protected String getFileName(String locale)
getFileNameJava
protected String getFileNameJava(String locale)
getFileNameFlex
protected String getFileNameFlex(String locale)
suffix
protected abstract String suffix()
getOutputPath
public String getOutputPath()
- the root path to store the files
getLocalesUsed
protected List<String> getLocalesUsed()
- Returns:
- a list of String with the locales used in the current bundle
getCurrentBundle
protected MBBundle getCurrentBundle()
createProperties
protected Properties createProperties(String aLocale)
Copyright © 2011. All Rights Reserved.