public class ApplicationModelUtils extends Object
| Constructor and Description |
|---|
ApplicationModelUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Function<org.jdom2.Element,org.jdom2.Element> |
addAttribute(String name,
String value)
Adds an attribute to the element accepted by the function.
|
static Function<org.jdom2.Element,org.jdom2.Element> |
addChildNode(String namespace,
String name)
Adds a child node with the specified namespace and name.
|
static Function<org.jdom2.Element,org.jdom2.Element> |
attributeToChildNode(String name)
Transforms an attribute into a child.
|
static Function<org.jdom2.Element,org.jdom2.Element> |
changeAttribute(String name,
Optional<String> newName,
Optional<String> value)
Updates an element attribute on the element accepted by the function.
|
static Function<org.jdom2.Element,org.jdom2.Element> |
changeNodeName(String nameSpace,
String name)
Changes node name and namespace.
|
static Function<org.jdom2.Element,org.jdom2.Element> |
moveAttributeToChildNode(String name,
String childNodeName)
Moves to the first child with the specified name an attribute with of the element accepted by the function.
|
static Function<org.jdom2.Element,org.jdom2.Element> |
moveContentToChild(String childNodeName)
Moves the content that does not have the as contents of the first children of the element accepted by the function.
|
static Function<org.jdom2.Element,org.jdom2.Element> |
removeAttribute(String name)
Removes an attribute from the element accepted by the function.
|
public static Function<org.jdom2.Element,org.jdom2.Element> changeNodeName(String nameSpace, String name)
nameSpace - the new element namespacename - the new element namepublic static Function<org.jdom2.Element,org.jdom2.Element> addAttribute(String name, String value)
name - the attribute namevalue - the attribute valuepublic static Function<org.jdom2.Element,org.jdom2.Element> changeAttribute(String name, Optional<String> newName, Optional<String> value)
name - the name of the attribute to be updatednewName - the new attribute name (optional)value - the new attribute value (optional)public static Function<org.jdom2.Element,org.jdom2.Element> removeAttribute(String name)
name - the name of the attribute to be removedpublic static Function<org.jdom2.Element,org.jdom2.Element> moveContentToChild(String childNodeName)
childNodeName - the name of the first children that is going to receive the contentpublic static Function<org.jdom2.Element,org.jdom2.Element> moveAttributeToChildNode(String name, String childNodeName)
name - the attribute namechildNodeName - the child namepublic static Function<org.jdom2.Element,org.jdom2.Element> attributeToChildNode(String name)
name - the name of the attribute to be turned into a childpublic static Function<org.jdom2.Element,org.jdom2.Element> addChildNode(String namespace, String name)
namespace - the new child namespacename - the new child nameCopyright © 2018 MuleSoft Inc. All rights reserved.