org.jomc.tools
Class ResourceFileProcessor

Package class diagram package ResourceFileProcessor
java.lang.Object
  extended by org.jomc.tools.JomcTool
      extended by org.jomc.tools.ResourceFileProcessor

public class ResourceFileProcessor
extends JomcTool

Processes resource files.

Use Cases:

Version:
$JOMC: ResourceFileProcessor.java 3868 2011-10-14 13:23:09Z schulte2005 $
Author:
Christian Schulte
See Also:
JomcTool.getModules()

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jomc.tools.JomcTool
JomcTool.Listener
 
Constructor Summary
ResourceFileProcessor()
          Creates a new ResourceFileProcessor instance.
ResourceFileProcessor(ResourceFileProcessor tool)
          Creates a new ResourceFileProcessor instance taking a ResourceFileProcessor instance to initialize the instance with.
 
Method Summary
 Locale getResourceBundleDefaultLocale()
          Gets the language of the default language properties file of generated resource bundle resource files.
 Map<Locale,Properties> getResourceBundleResources(Implementation implementation)
          Gets resource bundle properties resources of a given implementation.
 Map<Locale,Properties> getResourceBundleResources(Specification specification)
          Gets resource bundle properties resources of a given specification.
 void setResourceBundleDefaultLocale(Locale value)
          Sets the language of the default language properties file of generated resource bundle resource files.
 void writeResourceBundleResourceFiles(File resourcesDirectory)
          Writes resource bundle resource files of the modules of the instance to a given directory.
 void writeResourceBundleResourceFiles(Implementation implementation, File resourcesDirectory)
          Writes resource bundle resource files of a given implementation from the modules of the instance to a directory.
 void writeResourceBundleResourceFiles(Module module, File resourcesDirectory)
          Writes resource bundle resource files of a given module from the modules of the instance to a given directory.
 void writeResourceBundleResourceFiles(Specification specification, File resourcesDirectory)
          Writes resource bundle resource files of a given specification from the modules of the instance to a directory.
 
Methods inherited from class org.jomc.tools.JomcTool
getBooleanString, getCsvString, getDefaultLogLevel, getDefaultTemplateProfile, getDisplayLanguage, getHtmlString, getImplementedJavaTypeNames, getIndentation, getIndentation, getInputEncoding, getIsoDate, getIsoDateTime, getIsoTime, getJavaClasspathLocation, getJavaClasspathLocation, getJavadocComment, getJavadocComment, getJavaGetterMethodName, getJavaGetterMethodName, getJavaGetterMethodName, getJavaIdentifier, getJavaInterfaceNames, getJavaMethodParameterName, getJavaMethodParameterName, getJavaMethodParameterName, getJavaMethodParameterName, getJavaModifierName, getJavaModifierName, getJavaModifierName, getJavaPackageName, getJavaPackageName, getJavaPackageName, getJavaScriptString, getJavaSetterMethodName, getJavaSetterMethodName, getJavaSetterMethodName, getJavaString, getJavaTypeName, getJavaTypeName, getJavaTypeName, getJavaTypeName, getJavaTypeName, getJavaTypeName, getLineSeparator, getListeners, getLocale, getLogLevel, getLongDate, getLongDateTime, getLongTime, getMediumDate, getMediumDateTime, getMediumTime, getModel, getModules, getOutputEncoding, getShortDate, getShortDateTime, getShortTime, getSqlString, getTemplateEncoding, getTemplateLocation, getTemplateParameters, getTemplateProfile, getVelocityContext, getVelocityEngine, getVelocityTemplate, getXmlString, getYears, isJavaDefaultPackage, isJavaDefaultPackage, isJavaPrimitiveType, isLoggable, log, setDefaultLogLevel, setDefaultTemplateProfile, setIndentation, setInputEncoding, setLineSeparator, setLocale, setLogLevel, setModel, setOutputEncoding, setTemplateEncoding, setTemplateLocation, setTemplateProfile, setVelocityEngine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFileProcessor

public ResourceFileProcessor()
Creates a new ResourceFileProcessor instance.


ResourceFileProcessor

public ResourceFileProcessor(ResourceFileProcessor tool)
                      throws IOException
Creates a new ResourceFileProcessor instance taking a ResourceFileProcessor instance to initialize the instance with.

Parameters:
tool - The instance to initialize the new instance with.
Throws:
NullPointerException - if tool is null.
IOException - if copying tool fails.
Method Detail

getResourceBundleDefaultLocale

public final Locale getResourceBundleDefaultLocale()
Gets the language of the default language properties file of generated resource bundle resource files.

Returns:
The language of the default language properties file of generated resource bundle resource files.
See Also:
setResourceBundleDefaultLocale(java.util.Locale)

setResourceBundleDefaultLocale

public final void setResourceBundleDefaultLocale(Locale value)
Sets the language of the default language properties file of generated resource bundle resource files.

Parameters:
value - The language of the default language properties file of generated resource bundle resource files.
See Also:
getResourceBundleDefaultLocale()

writeResourceBundleResourceFiles

public void writeResourceBundleResourceFiles(File resourcesDirectory)
                                      throws IOException
Writes resource bundle resource files of the modules of the instance to a given directory.

Parameters:
resourcesDirectory - The directory to write resource bundle resource files to.
Throws:
NullPointerException - if resourcesDirectory is null.
IOException - if writing resource bundle resource files fails.
See Also:
writeResourceBundleResourceFiles(org.jomc.model.Module, java.io.File)

writeResourceBundleResourceFiles

public void writeResourceBundleResourceFiles(Module module,
                                             File resourcesDirectory)
                                      throws IOException
Writes resource bundle resource files of a given module from the modules of the instance to a given directory.

Parameters:
module - The module to process.
resourcesDirectory - The directory to write resource bundle resource files to.
Throws:
NullPointerException - if module or resourcesDirectory is null.
IOException - if writing resource bundle resource files fails.
See Also:
writeResourceBundleResourceFiles(org.jomc.model.Specification, java.io.File), writeResourceBundleResourceFiles(org.jomc.model.Implementation, java.io.File)

writeResourceBundleResourceFiles

public void writeResourceBundleResourceFiles(Specification specification,
                                             File resourcesDirectory)
                                      throws IOException
Writes resource bundle resource files of a given specification from the modules of the instance to a directory.

Parameters:
specification - The specification to process.
resourcesDirectory - The directory to write resource bundle resource files to.
Throws:
NullPointerException - if specification or resourcesDirectory is null.
IOException - if writing resource bundle resource files fails.
See Also:
getResourceBundleResources(org.jomc.model.Specification)

writeResourceBundleResourceFiles

public void writeResourceBundleResourceFiles(Implementation implementation,
                                             File resourcesDirectory)
                                      throws IOException
Writes resource bundle resource files of a given implementation from the modules of the instance to a directory.

Parameters:
implementation - The implementation to process.
resourcesDirectory - The directory to write resource bundle resource files to.
Throws:
NullPointerException - if implementation or resourcesDirectory is null.
IOException - if writing resource bundle resource files fails.
See Also:
getResourceBundleResources(org.jomc.model.Implementation)

getResourceBundleResources

public Map<Locale,Properties> getResourceBundleResources(Specification specification)
                                                  throws IOException
Gets resource bundle properties resources of a given specification.

Parameters:
specification - The specification to get resource bundle properties resources of.
Returns:
Resource bundle properties resources of specification.
Throws:
NullPointerException - if specification is null.
IOException - if getting the resource bundle properties resources fails.

getResourceBundleResources

public Map<Locale,Properties> getResourceBundleResources(Implementation implementation)
                                                  throws IOException
Gets resource bundle properties resources of a given implementation.

Parameters:
implementation - The implementation to get resource bundle properties resources of.
Returns:
Resource bundle properties resources of implementation.
Throws:
NullPointerException - if implementation is null.
IOException - if getting the resource bundle properties resources fails.


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.