org.mycore.common
Class MCRConfigurationTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.mycore.common.MCRConfigurationTask
All Implemented Interfaces:
Cloneable

public class MCRConfigurationTask
extends org.apache.tools.ant.Task

Ant task that allows 'mycore.properties' manipulation via ant.

Author:
Thomas Scheffler (yagee)

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
MCRConfigurationTask()
           
 
Method Summary
 void execute()
          Execute the requested operation.
 String getAction()
           
 String getKey()
           
 File getMergeFile()
           
 File getPropertyFile()
           
 String getValue()
           
 void setAction(String action)
          sets the action the task should perform.
 void setIncludePattern(String key)
           
 void setKey(String key)
           
 void setMergeFile(File mergeFile)
           
 void setPropertyFile(File propertyFile)
          sets the property file that needs to be changed.
 void setValue(String value)
          sets the value for the action to be performed.
 
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
clone, 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

MCRConfigurationTask

public MCRConfigurationTask()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute the requested operation.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - if an error occurs

getAction

public String getAction()

setAction

public void setAction(String action)
sets the action the task should perform.

Parameters:
action - either "addInclude" or "removeInclude"

getPropertyFile

public File getPropertyFile()

setPropertyFile

public void setPropertyFile(File propertyFile)
sets the property file that needs to be changed.

Parameters:
action - a 'mycore.properties' file

getMergeFile

public File getMergeFile()

setMergeFile

public void setMergeFile(File mergeFile)

getValue

public String getValue()

setValue

public void setValue(String value)
sets the value for the action to be performed. For 'addInclude' a value of "mycore.properties.moduleXY" would result in adding ",mycore.properties.moduleXY" to the property "MCR.Configuration.Include".

Parameters:
action - a 'mycore.properties' file

getKey

public String getKey()

setKey

public void setKey(String key)

setIncludePattern

public void setIncludePattern(String key)