Package org.codehaus.cargo.util
Class XmlReplacement
- java.lang.Object
-
- org.codehaus.cargo.util.XmlReplacement
-
public class XmlReplacement extends Object
XML replacement for theFileHandler
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XmlReplacement.ReplacementBehavior
Define how the XmlReplacement behaves XPath expression doesn't match anything.
-
Constructor Summary
Constructors Constructor Description XmlReplacement()
Empty constructor.XmlReplacement(String file, String xpathExpression, String attributeName, XmlReplacement.ReplacementBehavior replacementBehavior, String value)
Saves the attributes for this XML replacement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getAttributeName()
String
getFile()
XmlReplacement.ReplacementBehavior
getReplacementBehavior()
String
getValue()
String
getXpathExpression()
int
hashCode()
void
setAttributeName(String attributeName)
void
setFile(String file)
void
setReplacementBehavior(XmlReplacement.ReplacementBehavior replacementBehavior)
void
setValue(String value)
void
setXpathExpression(String xpathExpression)
String
toString()
-
-
-
Constructor Detail
-
XmlReplacement
public XmlReplacement()
Empty constructor.
-
XmlReplacement
public XmlReplacement(String file, String xpathExpression, String attributeName, XmlReplacement.ReplacementBehavior replacementBehavior, String value)
Saves the attributes for this XML replacement.- Parameters:
file
- File name.xpathExpression
- XPath expression.attributeName
- XML attribute name.replacementBehavior
- Behavior if XPath expression doesn't match anything.value
- Value or property name.
-
-
Method Detail
-
getFile
public String getFile()
- Returns:
- File name.
-
setFile
public void setFile(String file)
- Parameters:
file
- File name.
-
getXpathExpression
public String getXpathExpression()
- Returns:
- XPath expression.
-
setXpathExpression
public void setXpathExpression(String xpathExpression)
- Parameters:
xpathExpression
- XPath expression.
-
getAttributeName
public String getAttributeName()
- Returns:
- XML attribute name.
-
setAttributeName
public void setAttributeName(String attributeName)
- Parameters:
attributeName
- XML attribute name.
-
getReplacementBehavior
public XmlReplacement.ReplacementBehavior getReplacementBehavior()
- Returns:
- Behavior if XPath expression doesn't match anything.
-
setReplacementBehavior
public void setReplacementBehavior(XmlReplacement.ReplacementBehavior replacementBehavior)
- Parameters:
replacementBehavior
- Behavior if XPath expression doesn't match anything.
-
getValue
public String getValue()
- Returns:
- Value or property name.
-
setValue
public void setValue(String value)
- Parameters:
value
- Value or property name.
-
-