org.exist.client.xacml
Class AbstractPolicyNode

java.lang.Object
  extended by org.exist.client.xacml.AbstractTreeNode
      extended by org.exist.client.xacml.AbstractNodeContainer
          extended by org.exist.client.xacml.PolicyElementNode
              extended by org.exist.client.xacml.AbstractPolicyNode
All Implemented Interfaces:
NodeChangeListener, NodeContainer, PolicyElementContainer, XACMLTreeNode
Direct Known Subclasses:
PolicyNode, PolicySetNode

public abstract class AbstractPolicyNode
extends PolicyElementNode
implements PolicyElementContainer


Constructor Summary
AbstractPolicyNode(NodeContainer parent, AbstractPolicy policy)
           
AbstractPolicyNode(NodeContainer parent, String documentName, AbstractPolicy policy)
           
 
Method Summary
 void commit(boolean deep)
          Commits the state of this element.
 CombiningAlgorithm getCombiningAlgorithm()
           
 String getDocumentName()
          Returns the name of the document represented by this element if it is the top-level policy element of the document.
 boolean isAlgorithmModified()
           
 boolean isModified(boolean deep)
          Returns true if this element has been modified.
 void revert(boolean deep)
          Reverts the state of this element to the last commit.
 void setCombiningAlgorithm(CombiningAlgorithm algorithm)
           
 void setDocumentName(String documentName)
           
 
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.PolicyElementContainer
add, add, add, add, containsId, remove
 
Methods inherited from interface org.exist.client.xacml.NodeContainer
getChild, getChildCount, indexOfChild
 
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

AbstractPolicyNode

public AbstractPolicyNode(NodeContainer parent,
                          AbstractPolicy policy)

AbstractPolicyNode

public AbstractPolicyNode(NodeContainer parent,
                          String documentName,
                          AbstractPolicy policy)
Method Detail

getDocumentName

public String getDocumentName()
Returns the name of the document represented by this element if it is the top-level policy element of the document.

Returns:
The document name, or null if this element is not a top-level element

getCombiningAlgorithm

public CombiningAlgorithm getCombiningAlgorithm()

setCombiningAlgorithm

public void setCombiningAlgorithm(CombiningAlgorithm algorithm)

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 PolicyElementNode
Parameters:
deep - if descendants should be included
Returns:
if this element has been modified

isAlgorithmModified

public boolean isAlgorithmModified()

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 PolicyElementNode

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 PolicyElementNode

setDocumentName

public void setDocumentName(String documentName)


Copyright (C) Wolfgang Meier. All rights reserved.