Class XmlOperation
java.lang.Object
io.jenkins.plugins.xmleditor.core.edit.XmlOperation
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AddElement,Remove,RemoveAttribute,SetAttribute,SetText,Upsert
One modification applied to every node selected by
xpath().- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanapplyTo(LItem target, EditContext context) Applies the operation to one selected node.protected booleanapplyWhenNoMatch(EditContext context, XPathEngine engine) Called when the XPath matched nothing (and the expectation allowed it).protected StringExpectation used when the user did not setexpected;nullmeansAT_LEAST_ONE.expected()abstract Stringtype()Name used in reports and messages, e.g.protected XmlEditorExceptionunsupported(LItem target) xpath()
-
Constructor Details
-
XmlOperation
-
-
Method Details
-
type
Name used in reports and messages, e.g.setText. -
xpath
-
expected
-
applyTo
Applies the operation to one selected node.- Returns:
truewhen the document actually changed- Throws:
XmlEditorException
-
defaultExpected
Expectation used when the user did not setexpected;nullmeansAT_LEAST_ONE. -
applyWhenNoMatch
protected boolean applyWhenNoMatch(EditContext context, XPathEngine engine) throws XmlEditorException Called when the XPath matched nothing (and the expectation allowed it).- Returns:
truewhen the document changed- Throws:
XmlEditorException
-
unsupported
-