Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.client.xacml
Class PolicyNode

    java.lang.Object
      org.exist.client.xacml.AbstractTreeNode
          org.exist.client.xacml.AbstractNodeContainer
              org.exist.client.xacml.PolicyElementNode
                  org.exist.client.xacml.AbstractPolicyNode
                      org.exist.client.xacml.PolicyNode

All Implemented Interfaces:
  NodeChangeListener, NodeContainer, PolicyElementContainer, XACMLTreeNode

public class PolicyNode
extends AbstractPolicyNode

Constructor Summary
`PolicyNode(NodeContainer parent, com.sun.xacml.Policy policy)`
`PolicyNode(NodeContainer parent, java.lang.String documentName, com.sun.xacml.Policy policy)`

Method Summary
`void` | `add(int index, PolicyElementNode node)`
`void` | `add(int index, com.sun.xacml.PolicyTreeElement element)`
`void` | `add(PolicyElementNode node)`
`void` | `add(com.sun.xacml.PolicyTreeElement element)`
`void` | `commit(boolean deep)` Commits the state of this element.
`boolean` | `containsId(java.lang.String id)`
`com.sun.xacml.PolicyTreeElement` | `create()`
`com.sun.xacml.PolicyTreeElement` | `create(java.net.URI id)`
`com.sun.xacml.Policy` | `createPolicy()`
`com.sun.xacml.Policy` | `createPolicy(java.net.URI id)`
`XACMLTreeNode` | `getChild(int index)` Gets the child at the specified index.
`int` | `getChildCount()` Gets the number of children of this element.
`int` | `indexOfChild(java.lang.Object child)` Gets the index of a particular child.
`boolean` | `isModified(boolean deep)` Returns true if this element has been modified.
`void` | `remove(PolicyElementNode node)`
`void` | `revert(boolean deep)` Reverts the state of this element to the last commit.

Methods inherited from class org.exist.client.xacml.AbstractPolicyNode
`getCombiningAlgorithm, getDocumentName, isAlgorithmModified, setCombiningAlgorithm, setDocumentName`

Methods inherited from class org.exist.client.xacml.PolicyElementNode
`getDescription, getId, getTarget, isDescriptionModified, isIdModified, serialize, setDescription, toString`

Methods inherited from class org.exist.client.xacml.AbstractNodeContainer
`nodeAdded, nodeChanged, nodeRemoved`

Methods inherited from class org.exist.client.xacml.AbstractTreeNode
`getParent, setModified`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.exist.client.xacml.NodeChangeListener
`nodeAdded, nodeChanged, nodeRemoved`

Methods inherited from interface org.exist.client.xacml.XACMLTreeNode
`getParent, serialize, setModified`

Constructor Detail

### PolicyNode

    public PolicyNode(NodeContainer parent,
                      com.sun.xacml.Policy policy)

### PolicyNode

    public PolicyNode(NodeContainer parent,
                      java.lang.String documentName,
                      com.sun.xacml.Policy policy)

Method Detail

### create

    public com.sun.xacml.PolicyTreeElement create()

  Returns:
    a `PolicyTreeElement`

### create

    public com.sun.xacml.PolicyTreeElement create(java.net.URI id)

  Returns:
    a `PolicyTreeElement`

### createPolicy

    public com.sun.xacml.Policy createPolicy()

### createPolicy

    public com.sun.xacml.Policy createPolicy(java.net.URI id)

### add

    public void add(com.sun.xacml.PolicyTreeElement element)

### add

    public void add(int index,
                    com.sun.xacml.PolicyTreeElement element)

### add

    public void add(PolicyElementNode node)

### add

    public void add(int index,
                    PolicyElementNode node)

### remove

    public void remove(PolicyElementNode node)

### containsId

    public boolean containsId(java.lang.String id)

### getChildCount

    public int getChildCount()

  Description copied from interface: `NodeContainer`
  Gets the number of children of this element. Children should include the target of this element, the condition of a rule, child policies or policy sets of a policy set, or child rules of a policy.

  Returns:
    the number of children

### getChild

    public XACMLTreeNode getChild(int index)

  Description copied from interface: `NodeContainer`
  Gets the child at the specified index. Children may include the target of this element, the condition of a rule, child policies or policy sets of a policy set, or child rules of a policy.

  Parameters:
    `index` - The child's position
  Returns:
    the child

### indexOfChild

    public int indexOfChild(java.lang.Object child)

  Description copied from interface: `NodeContainer`
  Gets the index of a particular child. This operates on reference equality, not equals.

  Parameters:
    `child` - The child to obtain the index of
  Returns:
    The child's index, or -1 if it is not a child of this policy element

### isModified

    public boolean isModified(boolean deep)

  Description copied from interface: `XACMLTreeNode`
  Returns true if this element has been modified. If deep is true, then this takes into account the status of any descendants.

  Specified by:
    `isModified` in interface `XACMLTreeNode`
  Overrides:
    `isModified` in class `AbstractPolicyNode`

### revert

    public void revert(boolean deep)

  Description copied from interface: `XACMLTreeNode`
  Reverts the state of this element to the last commit. If deep is true, then this includes any descendants.

  Specified by:
    `revert` in interface `XACMLTreeNode`
  Overrides:
    `revert` in class `AbstractPolicyNode`

### commit

    public void commit(boolean deep)

  Description copied from interface: `XACMLTreeNode`
  Commits the state of this element. This state will be the state reverted to when revert is called. If deep is true, then this includes any descendants.

  Specified by:
    `commit` in interface `XACMLTreeNode`
  Overrides:
    `commit` in class `AbstractPolicyNode`

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.