T
- the type of nodes this class can handlepublic class NodeAddData<T> extends Object
A simple data class used by ExpressionEngine
to store
the results of the prepareAdd()
operation.
If a new property is to be added to a configuration, the affected
Configuration
object must know, where in its hierarchy of
configuration nodes new elements have to be added. This information is
obtained by an ExpressionEngine
object that interprets the key
of the new property. This expression engine will pack all information
necessary for the configuration to perform the add operation in an instance
of this class.
Information managed by this class contains:
Constructor and Description |
---|
NodeAddData(T parentNode,
String newName,
boolean isAttr,
Collection<String> intermediateNodes)
Creates a new instance of
NodeAddData and initializes it. |
Modifier and Type | Method and Description |
---|---|
String |
getNewNodeName()
Returns the name of the new node.
|
T |
getParent()
Returns the parent node.
|
List<String> |
getPathNodes()
Returns a list with further nodes that must be added.
|
boolean |
isAttribute()
Returns a flag if the new node to be added is an attribute.
|
public NodeAddData(T parentNode, String newName, boolean isAttr, Collection<String> intermediateNodes)
NodeAddData
and initializes it.parentNode
- the parent node of the add operationnewName
- the name of the new nodeisAttr
- flag whether the new node is an attributeintermediateNodes
- an optional collection with path nodespublic boolean isAttribute()
public String getNewNodeName()
public T getParent()
public List<String> getPathNodes()
database
. Now the key
database.connection.settings.username
(assuming the syntax
of the default expression engine) is to be added. Then
username
is the name of the new node, but the nodes
connection
and settings
must be added to
the parent node first. In this example these names would be returned by
this method.Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.