org.jomc.ant
Class ResourceFileProcessorTask

Package class diagram package ResourceFileProcessorTask
java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.jomc.ant.JomcTask
              extended by org.jomc.ant.JomcModelTask
                  extended by org.jomc.ant.JomcToolTask
                      extended by org.jomc.ant.ResourceFileProcessorTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
GenerateResourcesTask

public class ResourceFileProcessorTask
extends JomcToolTask

Base class for executing resource file processor based tasks.

Version:
$JOMC: ResourceFileProcessorTask.java 3838 2011-10-08 20:15:41Z schulte2005 $
Author:
Christian Schulte
See Also:
processResourceFiles()

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
ResourceFileProcessorTask()
          Creates a new ResourceFileProcessorTask instance.
 
Method Summary
 ResourceFileProcessorTask clone()
          Creates and returns a copy of this object.
 void configureResourceFileProcessor(ResourceFileProcessor resourceFileProcessor)
          Configures a given ResourceFileProcessor instance using the properties of the instance.
 void executeTask()
          Calls the processResourceFiles method if resource processing is enabled.
 String getResourceBundleDefaultLanguage()
          Gets the language of the default language properties file of generated resource bundle resource files.
 Class<? extends ResourceFileProcessor> getResourceFileProcessorClass()
          Gets the class of the ResourceFileProcessor backing the task.
 boolean isResourceProcessingEnabled()
          Gets a flag indicating the processing of resources is enabled.
 ResourceFileProcessor newResourceFileProcessor()
          Creates a new ResourceFileProcessor instance setup using the properties of the instance.
 void processResourceFiles()
          Processes resource files.
 void setResourceBundleDefaultLanguage(String value)
          Sets the language of the default language properties file of generated resource bundle resource files.
 void setResourceFileProcessorClass(Class<? extends ResourceFileProcessor> value)
          Sets the class of the ResourceFileProcessor backing the task.
 void setResourceProcessingEnabled(boolean value)
          Sets the flag indicating the processing of resources is enabled.
 
Methods inherited from class org.jomc.ant.JomcToolTask
configureJomcTool, createLocale, createTemplateParameter, createTemplateParameterResource, createVelocityProperty, createVelocityPropertyResource, getDefaultTemplateProfile, getImplementation, getImplementation, getIndentation, getInputEncoding, getLineSeparator, getLocale, getModule, getModule, getOutputEncoding, getSpecification, getSpecification, getTemplateEncoding, getTemplateLocation, getTemplateParameterResources, getTemplateParameters, getTemplateProfile, getVelocityProperties, getVelocityPropertyResources, isModulesProcessingRequested, postExecuteTask, preExecuteTask, setDefaultTemplateProfile, setImplementation, setIndentation, setInputEncoding, setLineSeparator, setModule, setOutputEncoding, setSpecification, setTemplateEncoding, setTemplateLocation, setTemplateProfile
 
Methods inherited from class org.jomc.ant.JomcModelTask
createModuleResource, getModel, getModuleLocation, getModuleResources, getTransformerLocation, isModelObjectClasspathResolutionEnabled, isModelResourceValidationEnabled, newModelContext, setModelObjectClasspathResolutionEnabled, setModelResourceValidationEnabled, setModuleLocation, setTransformerLocation
 
Methods inherited from class org.jomc.ant.JomcTask
assertKeysNotNull, assertLocationsNotNull, assertNamesNotNull, assertNotNull, createClasspath, createModelContextAttribute, createTransformationOutputProperty, createTransformationParameter, createTransformationParameterResource, execute, getClasspath, getDirectory, getIf, getModel, getModelContextAttributes, getModelContextFactoryClassName, getModletLocation, getModletSchemaSystemId, getPlatformProviderLocation, getProperties, getProviderLocation, getResource, getResources, getTransformationOutputProperties, getTransformationParameterResources, getTransformationParameters, getTransformer, getUnless, isModelProcessingEnabled, isModletResourceValidationEnabled, logMessage, logMessage, logSeparator, logValidationReport, newProjectClassLoader, setClasspath, setClasspathRef, setIf, setModel, setModelContextFactoryClassName, setModelProcessingEnabled, setModletLocation, setModletResourceValidationEnabled, setModletSchemaSystemId, setPlatformProviderLocation, setProviderLocation, setUnless
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFileProcessorTask

public ResourceFileProcessorTask()
Creates a new ResourceFileProcessorTask instance.

Method Detail

isResourceProcessingEnabled

public final boolean isResourceProcessingEnabled()
Gets a flag indicating the processing of resources is enabled.

Returns:
true, if processing of resources is enabled; false, else.
See Also:
setResourceProcessingEnabled(boolean)

setResourceProcessingEnabled

public final void setResourceProcessingEnabled(boolean value)
Sets the flag indicating the processing of resources is enabled.

Parameters:
value - true, to enable processing of resources; false, to disable processing of resources.
See Also:
isResourceProcessingEnabled()

getResourceBundleDefaultLanguage

public final String getResourceBundleDefaultLanguage()
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 or null.
See Also:
setResourceBundleDefaultLanguage(java.lang.String)

setResourceBundleDefaultLanguage

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

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

getResourceFileProcessorClass

public final Class<? extends ResourceFileProcessor> getResourceFileProcessorClass()
Gets the class of the ResourceFileProcessor backing the task.

Returns:
The class of the ResourceFileProcessor backing the task.
See Also:
setResourceFileProcessorClass(java.lang.Class)

setResourceFileProcessorClass

public final void setResourceFileProcessorClass(Class<? extends ResourceFileProcessor> value)
Sets the class of the ResourceFileProcessor backing the task.

Parameters:
value - The new class of the ResourceFileProcessor backing the task or null.
See Also:
getResourceFileProcessorClass()

newResourceFileProcessor

public ResourceFileProcessor newResourceFileProcessor()
                                               throws org.apache.tools.ant.BuildException
Creates a new ResourceFileProcessor instance setup using the properties of the instance.

Returns:
A new ResourceFileProcessor instance.
Throws:
org.apache.tools.ant.BuildException - if creating a new ResourceFileProcessor instance fails.
See Also:
getResourceFileProcessorClass(), configureResourceFileProcessor(org.jomc.tools.ResourceFileProcessor)

configureResourceFileProcessor

public void configureResourceFileProcessor(ResourceFileProcessor resourceFileProcessor)
                                    throws org.apache.tools.ant.BuildException
Configures a given ResourceFileProcessor instance using the properties of the instance.

Parameters:
resourceFileProcessor - The resource file processor to configure.
Throws:
NullPointerException - if resourceFileProcessor is null.
org.apache.tools.ant.BuildException - if configuring resourceFileProcessor fails.
See Also:
JomcToolTask.configureJomcTool(org.jomc.tools.JomcTool)

executeTask

public final void executeTask()
                       throws org.apache.tools.ant.BuildException
Calls the processResourceFiles method if resource processing is enabled.

Overrides:
executeTask in class JomcTask
Throws:
org.apache.tools.ant.BuildException - if processing resource files fails.
See Also:
processResourceFiles()

processResourceFiles

public void processResourceFiles()
                          throws org.apache.tools.ant.BuildException
Processes resource files.

Throws:
org.apache.tools.ant.BuildException - if processing resource files fails.
See Also:
executeTask()

clone

public ResourceFileProcessorTask clone()
Creates and returns a copy of this object.

Overrides:
clone in class JomcToolTask
Returns:
A copy of this object.


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.