public abstract class AbstractTask extends Object implements Task
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DOM_ATTRIBUTE_GROUP |
protected static String |
DOM_ATTRIBUTE_IF |
protected static String |
DOM_ATTRIBUTE_PATH |
protected static String |
DOM_ELEMENT_CONDITION |
protected static String |
DOM_ELEMENT_DEFAULT |
protected static String |
DOM_ELEMENT_DESCRIPTION |
protected static String |
DOM_ELEMENT_VALUE |
| Constructor and Description |
|---|
AbstractTask(ConfigGroupManager groupManager)
Public Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.jdom2.Element |
createJDOMCDATAElement(String name,
String text)
Create a JDOM CDATA Element with the given name and possibly text.
|
protected org.jdom2.Element |
createJDOMElement(String name)
Create a JDOM Element with the given name.
|
protected org.jdom2.Element |
createJDOMTextElement(String name,
String text)
Create a JDOM Text Element with the given name and possibly text.
|
void |
deserialize(org.jdom2.Element root)
Load the task from a list of JDOM Elements.
|
boolean |
equals(Object other) |
boolean |
evaluateCondition(String text,
ConfigGroup group)
Evaluate the task condition.
|
protected String |
expandPropertyExpression(String text,
ConfigGroup group)
Replace matching properties from the given groupManager in the given text.
|
ConfigGroupManager |
getGroupManager()
Gets the groupManager property value.
|
String |
getPath()
Gets the path property value.
|
int |
hashCode() |
void |
serialize(org.jdom2.Element node)
Serialize this Task to a JDOM Element.
|
void |
setPath(String path)
Sets the path property.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitapply, configureInteractively, getSerializedName, isConfigured, mergeprotected static final String DOM_ATTRIBUTE_PATH
protected static final String DOM_ATTRIBUTE_GROUP
protected static final String DOM_ATTRIBUTE_IF
protected static final String DOM_ELEMENT_DESCRIPTION
protected static final String DOM_ELEMENT_DEFAULT
protected static final String DOM_ELEMENT_VALUE
protected static final String DOM_ELEMENT_CONDITION
public AbstractTask(ConfigGroupManager groupManager)
groupManager - the groupManager to usepublic ConfigGroupManager getGroupManager()
public String getPath()
public void setPath(String path)
path - the new property valuepublic void deserialize(org.jdom2.Element root)
throws IOException
deserialize in interface Taskroot - the JDOM Element to use for configuring this instanceIOException - indicating IO Errorpublic void serialize(org.jdom2.Element node)
throws IOException
serialize in interface Tasknode - the JDOM Element to serialize toIOException - indicating IO Errorprotected String expandPropertyExpression(String text, ConfigGroup group)
text - the text to expandgroup - the ConfigGroup to use as source for expanding property expressionspublic boolean evaluateCondition(String text, ConfigGroup group)
text - the condition to evaluategroup - the ConfigGroup to use as source for expanding property expressions before evaluationprotected org.jdom2.Element createJDOMElement(String name)
name - the element nameprotected org.jdom2.Element createJDOMTextElement(String name, String text)
name - the element nametext - the element text or nullprotected org.jdom2.Element createJDOMCDATAElement(String name, String text)
name - the element nametext - the element text or nullCopyright © 2013–2017 Polago AB. All rights reserved.