Class DomXmlEnsure
java.lang.Object
org.camunda.commons.utils.EnsureUtil
org.camunda.spin.impl.xml.dom.util.DomXmlEnsure
A list of generally useful source code assertions provided as static helpers.
- Author:
- Daniel Meyer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
ensureChildElement
(DomXmlElement parentElement, DomXmlElement childElement) Ensures that the element is child element of the parent element.static void
ensureNotDocumentRootExpression
(String expression) Ensures that the expression is not the root expression '/'.static void
ensureXPathNotEmpty
(NodeList nodeList, String expression) Ensure that the nodeList is either null or empty.static void
ensureXPathNotNull
(Node node, String expression) Ensure that the node is not null.Methods inherited from class org.camunda.commons.utils.EnsureUtil
ensureNotNull, ensureParamInstanceOf
-
Constructor Details
-
DomXmlEnsure
public DomXmlEnsure()
-
-
Method Details
-
ensureChildElement
Ensures that the element is child element of the parent element.- Parameters:
parentElement
- the parent xml dom elementchildElement
- the child element- Throws:
SpinXmlElementException
- if the element is not child of the parent element
-
ensureNotDocumentRootExpression
Ensures that the expression is not the root expression '/'.- Parameters:
expression
- the expression to ensure to be not the root expression '/'- Throws:
SpinXPathException
- if the expression is the root expression '/'
-
ensureXPathNotNull
Ensure that the node is not null.- Parameters:
node
- the node to ensure to be not nullexpression
- the expression was used to find the node- Throws:
SpinXPathException
- if the node is null
-
ensureXPathNotEmpty
Ensure that the nodeList is either null or empty.- Parameters:
nodeList
- the nodeList to ensure to be either null or emptyexpression
- the expression was used to fine the nodeList- Throws:
SpinXPathException
- if the nodeList is either null or empty
-