Package org.jboss.as.cli.operation
Interface OperationRequestAddress
-
- All Superinterfaces:
Iterable<OperationRequestAddress.Node>
- All Known Implementing Classes:
DefaultOperationRequestAddress
public interface OperationRequestAddress extends Iterable<OperationRequestAddress.Node>
An instance of this interface represents a prefix for the operation request address part.- Author:
- Alexey Loubyansky
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceOperationRequestAddress.Node
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappendPath(OperationRequestAddress path)Appends the path to the current address.booleanendsOnType()Checks whether the prefix ends on a node type or a node name.StringgetNodeName()Returns the node name of the last node.StringgetNodeType()Returns the node type of the last node.booleanisEmpty()Checks whether the prefix is empty.intlength()Returns the number of nodes (more specifically node types, if the address ends on a type, it means the last node is not complete, but it will be counted as a node by this method).voidreset()Resets the prefix, i.e. this will make the prefix empty.voidtoNode(String nodeName)Appends the node name to the current address.voidtoNode(String nodeType, String nodeName)Appends the node to the current address.StringtoNodeType()Sets the current prefix to the node type of the current node, i.e. the node name is removed from the end of the prefix.voidtoNodeType(String nodeType)Appends the node type to the current address.OperationRequestAddress.NodetoParentNode()Removes the last node in the prefix, i.e. moves the value a node up.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
toNodeType
void toNodeType(String nodeType)
Appends the node type to the current address. Note, the current address must end on a node name before this method is invoked.- Parameters:
nodeType- the node type to append to the current address
-
toNode
void toNode(String nodeName)
Appends the node name to the current address. Note, the current address must end on a node type before this method is invoked.- Parameters:
nodeName- the node name to append to the current address
-
toNode
void toNode(String nodeType, String nodeName)
Appends the node to the current address. Note, the current address must end on a node (i.e. node name) before this method is invoked.- Parameters:
nodeType- the node type of the node to append to the current addressnodeName- the node name of the node to append to the current address
-
appendPath
void appendPath(OperationRequestAddress path)
Appends the path to the current address. Note, the current address must end on a node (i.e. node name) before this method is invoked.- Parameters:
path- the path to append to the current address
-
toNodeType
String toNodeType()
Sets the current prefix to the node type of the current node, i.e. the node name is removed from the end of the prefix.- Returns:
- the node name the prefix ended on
-
toParentNode
OperationRequestAddress.Node toParentNode()
Removes the last node in the prefix, i.e. moves the value a node up.- Returns:
- the node the prefix ended on
-
reset
void reset()
Resets the prefix, i.e. this will make the prefix empty.
-
endsOnType
boolean endsOnType()
Checks whether the prefix ends on a node type or a node name.- Returns:
- true if the prefix ends on a node type, otherwise false.
-
isEmpty
boolean isEmpty()
Checks whether the prefix is empty.- Returns:
- true if the prefix is empty, otherwise false.
-
getNodeType
String getNodeType()
Returns the node type of the last node.- Returns:
- the node type of the last node or null if the prefix is empty.
-
getNodeName
String getNodeName()
Returns the node name of the last node.- Returns:
- the node name of the last node or null if the prefix ends on a type or is empty.
-
length
int length()
Returns the number of nodes (more specifically node types, if the address ends on a type, it means the last node is not complete, but it will be counted as a node by this method).- Returns:
- the number of nodes this address consists of
-
-