public class NodeHelper
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
NodeHelper()
Default constructor for directory node utilities
|
Modifier and Type | Method and Description |
---|---|
static void |
addNode(DirectoryService ds,
java.lang.String nodeId,
java.lang.String cls,
Attribute[] attrs)
Add a new node to the directory, having the specified class and attributes.
|
static void |
addNode(DirectoryService ds,
java.lang.String nodeId,
java.lang.String cls,
java.lang.Object value)
Add a new node to the directory, having the specified class and a single attribute
with the same class and specified value.
|
static void |
closeBatch(DirectoryService ds,
java.lang.String node)
Close a batch editing session.
|
static void |
deleteNode(DirectoryService ds,
java.lang.String nodeId)
Delete the specified node and all of its children.
|
static void |
openBatch(DirectoryService ds,
java.lang.String node)
Open a batch editing session for the specified node.
|
public static void deleteNode(DirectoryService ds, java.lang.String nodeId)
ds
- The directory servicenodeId
- The node ID.java.lang.RuntimeException
- If the node or one of its children could not be deleted.public static void addNode(DirectoryService ds, java.lang.String nodeId, java.lang.String cls, java.lang.Object value)
ds
- The directory servicenodeId
- The node ID.cls
- The node's and attribute's class.value
- The attribute's value.java.lang.RuntimeException
- If the node could not be added.public static void addNode(DirectoryService ds, java.lang.String nodeId, java.lang.String cls, Attribute[] attrs)
ds
- The directory servicenodeId
- The node ID.cls
- The node's class.attrs
- The node's attributes.java.lang.RuntimeException
- If the node could not be added.public static void openBatch(DirectoryService ds, java.lang.String node)
ds
- The directory servicenode
- The node ID.java.lang.RuntimeException
- If the batch editing session could not be opened.public static void closeBatch(DirectoryService ds, java.lang.String node)
ds
- The directory servicenode
- The node ID.java.lang.RuntimeException
- If the batch editing session could not be closed.