org.exist.client.xacml
Class PolicyElementNode

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

public abstract class PolicyElementNode
extends AbstractNodeContainer
implements NodeContainer


Method Summary
 void commit(boolean deep)
          Commits the state of this element.
 String getDescription()
          Gets the description of the element.
 URI getId()
          Retrieves the id of this element.
 TargetNode getTarget()
          Gets the wrapper around the target for this element.
 boolean isDescriptionModified()
           
 boolean isIdModified()
           
 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.
 String serialize(boolean indent)
          Serializes this node to a String
 void setDescription(String description)
          Sets the description of the element.
 String toString()
          Provides a string representation appropriate for display to the user.
 
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.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, setModified
 

Method Detail

getId

public URI getId()
Retrieves the id of this element.

Returns:
the id

toString

public String toString()
Provides a string representation appropriate for display to the user.

Overrides:
toString in class Object
Returns:
The string representation

getDescription

public String getDescription()
Gets the description of the element.

Returns:
the description

setDescription

public void setDescription(String description)
Sets the description of the element. May be null.

Parameters:
description - The new description.

isIdModified

public boolean isIdModified()

isDescriptionModified

public boolean isDescriptionModified()

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

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 AbstractTreeNode

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 AbstractTreeNode

getTarget

public TargetNode getTarget()
Gets the wrapper around the target for this element. The returned value will never be null, even if this element has an empty target.

Returns:
a wrapper around this element's target

serialize

public String serialize(boolean indent)
Description copied from interface: XACMLTreeNode
Serializes this node to a String

Specified by:
serialize in interface XACMLTreeNode
Parameters:
indent - Whether or not the XML should be indented
Returns:
The string representation of this node


Copyright (C) Wolfgang Meier. All rights reserved.