org.jomc.ant
Class MergeModletsTask

Package class diagram package MergeModletsTask
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.MergeModletsTask
All Implemented Interfaces:
Cloneable

public final class MergeModletsTask
extends JomcTask

Task for merging modlet resources.

Version:
$JOMC: MergeModletsTask.java 4200 2012-01-25 09:46:13Z schulte2005 $
Author:
Christian Schulte

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
MergeModletsTask()
          Creates a new MergeModletsTask instance.
 
Method Summary
 MergeModletsTask clone()
          Creates and returns a copy of this object.
 NameType createModletExclude()
          Creates a new modletExclude element instance.
 NameType createModletInclude()
          Creates a new modletInclude element instance.
 TransformerResourceType createModletObjectStylesheetResource()
          Creates a new modletObjectStylesheetResource element instance.
 ModletResourceType createModletResource()
          Creates a new modletResource element instance.
 void executeTask()
          Merges modlet resources.
 String getModletEncoding()
          Gets the encoding of the modlet resource.
 Set<NameType> getModletExcludes()
          Gets a set of modlet names to exclude.
 File getModletFile()
          Gets the file to write the merged modlet to.
 Set<NameType> getModletIncludes()
          Gets a set of modlet names to include.
 String getModletName()
          Gets the name of the merged modlet.
 List<TransformerResourceType> getModletObjectStylesheetResources()
          Gets the XSLT documents to use for transforming modlet objects.
 Set<ModletResourceType> getModletResources()
          Gets a set of resource names to merge.
 String getModletVendor()
          Gets the vendor of the merged modlet.
 String getModletVersion()
          Gets the version of the merged modlet.
 boolean isModletExcluded(Modlet modlet)
          Tests exclusion of a given modlet based on property modletExcludes.
 boolean isModletIncluded(Modlet modlet)
          Tests inclusion of a given modlet based on property modletIncludes.
 void preExecuteTask()
          Called by the execute method prior to the executeTask method.
 void setModletEncoding(String value)
          Sets the encoding of the modlet resource.
 void setModletFile(File value)
          Sets the file to write the merged modlet to.
 void setModletName(String value)
          Sets the name of the merged modlet.
 void setModletVendor(String value)
          Sets the vendor of the merged modlet.
 void setModletVersion(String value)
          Sets the version of the merged modlet.
 
Methods inherited from class org.jomc.ant.JomcTask
assertKeysNotNull, assertLocationsNotNull, assertNamesNotNull, assertNotNull, createClasspath, createModelContextAttribute, createTransformationOutputProperty, createTransformationParameter, createTransformationParameterResource, execute, getClasspath, getDirectory, getIf, getModel, getModel, getModelContextAttributes, getModelContextFactoryClassName, getModletLocation, getModletSchemaSystemId, getPlatformProviderLocation, getProperties, getProviderLocation, getResource, getResources, getTransformationOutputProperties, getTransformationParameterResources, getTransformationParameters, getTransformer, getUnless, isModelProcessingEnabled, isModletResourceValidationEnabled, logMessage, logMessage, logSeparator, logValidationReport, newModelContext, newProjectClassLoader, postExecuteTask, 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

MergeModletsTask

public MergeModletsTask()
Creates a new MergeModletsTask instance.

Method Detail

getModletFile

public File getModletFile()
Gets the file to write the merged modlet to.

Returns:
The file to write the merged modlet to or null.
See Also:
setModletFile(java.io.File)

setModletFile

public void setModletFile(File value)
Sets the file to write the merged modlet to.

Parameters:
value - The new file to write the merged modlet to or null.
See Also:
getModletFile()

getModletEncoding

public String getModletEncoding()
Gets the encoding of the modlet resource.

Returns:
The encoding of the modlet resource.
See Also:
setModletEncoding(java.lang.String)

setModletEncoding

public void setModletEncoding(String value)
Sets the encoding of the modlet resource.

Parameters:
value - The new encoding of the modlet resource or null.
See Also:
getModletEncoding()

getModletName

public String getModletName()
Gets the name of the merged modlet.

Returns:
The name of the merged modlet or null.
See Also:
setModletName(java.lang.String)

setModletName

public void setModletName(String value)
Sets the name of the merged modlet.

Parameters:
value - The new name of the merged modlet or null.
See Also:
getModletName()

getModletVersion

public String getModletVersion()
Gets the version of the merged modlet.

Returns:
The version of the merged modlet or null.
See Also:
setModletVersion(java.lang.String)

setModletVersion

public void setModletVersion(String value)
Sets the version of the merged modlet.

Parameters:
value - The new version of the merged modlet or null.
See Also:
getModletVersion()

getModletVendor

public String getModletVendor()
Gets the vendor of the merged modlet.

Returns:
The vendor of the merge modlet or null.
See Also:
setModletVendor(java.lang.String)

setModletVendor

public void setModletVendor(String value)
Sets the vendor of the merged modlet.

Parameters:
value - The new vendor of the merged modlet or null.
See Also:
getModletVendor()

getModletResources

public Set<ModletResourceType> getModletResources()
Gets a set of resource names to merge.

This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make to the returned set will be present inside the object. This is why there is no set method for the modlet resources property.

Returns:
A set of names of resources to merge.
See Also:
createModletResource()

createModletResource

public ModletResourceType createModletResource()
Creates a new modletResource element instance.

Returns:
A new modletResource element instance.
See Also:
getModletResources()

getModletIncludes

public Set<NameType> getModletIncludes()
Gets a set of modlet names to include.

This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make to the returned set will be present inside the object. This is why there is no set method for the modlet includes property.

Returns:
A set of modlet names to include.
See Also:
createModletInclude()

createModletInclude

public NameType createModletInclude()
Creates a new modletInclude element instance.

Returns:
A new modletInclude element instance.
See Also:
getModletIncludes()

getModletExcludes

public Set<NameType> getModletExcludes()
Gets a set of modlet names to exclude.

This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make to the returned set will be present inside the object. This is why there is no set method for the modlet excludes property.

Returns:
A set of modlet names to exclude.
See Also:
createModletExclude()

createModletExclude

public NameType createModletExclude()
Creates a new modletExclude element instance.

Returns:
A new modletExclude element instance.
See Also:
getModletExcludes()

getModletObjectStylesheetResources

public List<TransformerResourceType> getModletObjectStylesheetResources()
Gets the XSLT documents to use for transforming modlet objects.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the object. This is why there is no set method for the modlet object stylesheet resources property.

Returns:
The XSLT documents to use for transforming modlet objects.
See Also:
createModletObjectStylesheetResource()

createModletObjectStylesheetResource

public TransformerResourceType createModletObjectStylesheetResource()
Creates a new modletObjectStylesheetResource element instance.

Returns:
A new modletObjectStylesheetResource element instance.
See Also:
getModletObjectStylesheetResources()

preExecuteTask

public void preExecuteTask()
                    throws org.apache.tools.ant.BuildException
Called by the execute method prior to the executeTask method.

Overrides:
preExecuteTask in class JomcTask
Throws:
org.apache.tools.ant.BuildException - if execution fails.
See Also:
JomcTask.execute()

executeTask

public void executeTask()
                 throws org.apache.tools.ant.BuildException
Merges modlet resources.

Overrides:
executeTask in class JomcTask
Throws:
org.apache.tools.ant.BuildException - if merging modlet resources fails.
See Also:
JomcTask.execute()

isModletIncluded

public boolean isModletIncluded(Modlet modlet)
Tests inclusion of a given modlet based on property modletIncludes.

Parameters:
modlet - The modlet to test.
Returns:
true, if modlet is included based on property modletIncludes.
Throws:
NullPointerException - if modlet is null.
See Also:
getModletIncludes()

isModletExcluded

public boolean isModletExcluded(Modlet modlet)
Tests exclusion of a given modlet based on property modletExcludes.

Parameters:
modlet - The modlet to test.
Returns:
true, if modlet is excluded based on property modletExcludes.
Throws:
NullPointerException - if modlet is null.
See Also:
getModletExcludes()

clone

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

Overrides:
clone in class JomcTask
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.