Class Upsert
java.lang.Object
io.jenkins.plugins.xmleditor.core.edit.XmlOperation
io.jenkins.plugins.xmleditor.core.edit.Upsert
- All Implemented Interfaces:
Serializable
Updates the selected nodes like
SetText; when nothing matches, creates the missing part of the path (see
UpsertPath) under the deepest existing element and sets the value there.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.type()Name used in reports and messages, e.g.Methods inherited from class io.jenkins.plugins.xmleditor.core.edit.XmlOperation
expected, unsupported, xpath
-
Constructor Details
-
Upsert
-
-
Method Details
-
type
Description copied from class:XmlOperationName used in reports and messages, e.g.setText.- Specified by:
typein classXmlOperation
-
defaultExpected
Description copied from class:XmlOperationExpectation used when the user did not setexpected;nullmeansAT_LEAST_ONE.- Overrides:
defaultExpectedin classXmlOperation
-
applyTo
Description copied from class:XmlOperationApplies the operation to one selected node.- Specified by:
applyToin classXmlOperation- Returns:
truewhen the document actually changed- Throws:
XmlEditorException
-
applyWhenNoMatch
protected boolean applyWhenNoMatch(EditContext context, XPathEngine engine) throws XmlEditorException Description copied from class:XmlOperationCalled when the XPath matched nothing (and the expectation allowed it).- Overrides:
applyWhenNoMatchin classXmlOperation- Returns:
truewhen the document changed- Throws:
XmlEditorException
-