org.systinet.wasp.policy
Class PolicyCompositor

java.lang.Object
  extended byorg.systinet.wasp.policy.PolicyElement
      extended byorg.systinet.wasp.policy.PolicyCompositor
Direct Known Subclasses:
PolicyAllOperator, PolicyExactlyOneOperator, PolicyOneOrMoreOperator

public abstract class PolicyCompositor
extends PolicyElement

This class represents policy compositor.

Since:
5.0
Component:
Core

Constructor Summary
PolicyCompositor()
           
 
Method Summary
 void add(PolicyElement element)
          Adds given element to this compositor.
abstract  javax.xml.transform.Source getContent()
          Gets the content of this object as Source
 PolicyElement[] getElements()
          Gets the child elements of this compositor.
 java.lang.String getId()
          Gets the compositor Id.
 void remove(PolicyElement element)
          Removes given element from this compositor and sets parent of given element to null.
 void setId(java.lang.String id)
          Sets the compositor Id.
 
Methods inherited from class org.systinet.wasp.policy.PolicyElement
getParentElement, getPreference, getUsage, readStandardAttributes, setParentElement, setPreference, setUsage, writeStandardAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyCompositor

public PolicyCompositor()
Method Detail

getId

public java.lang.String getId()
Gets the compositor Id.

Returns:
he compositor Id

setId

public void setId(java.lang.String id)
Sets the compositor Id.

Parameters:
id - compositor Id

add

public void add(PolicyElement element)
         throws PolicyException
Adds given element to this compositor. Sets the parent of given element to this compositor.

Parameters:
element - child element to add
Throws:
PolicyException - when the given element has already set other parent

remove

public void remove(PolicyElement element)
Removes given element from this compositor and sets parent of given element to null.

Parameters:
element - child element to remove

getElements

public PolicyElement[] getElements()
Gets the child elements of this compositor.

Returns:
the child elements of this compositor

getContent

public abstract javax.xml.transform.Source getContent()
                                               throws PolicyException
Gets the content of this object as Source

Specified by:
getContent in class PolicyElement
Returns:
the content of this object as Source
Throws:
PolicyException - when an error occurs