org.apache.neethi
Class AbstractPolicyOperator

java.lang.Object
  extended byorg.apache.neethi.AbstractPolicyOperator
All Implemented Interfaces:
PolicyComponent, PolicyOperator
Direct Known Subclasses:
All, ExactlyOne

public abstract class AbstractPolicyOperator
extends java.lang.Object
implements PolicyOperator

AbstractPolicyOperator provides an implementation of few functions of PolicyOperator interface that other PolicyOperators can use.


Field Summary
protected  java.util.ArrayList policyComponents
           
 
Constructor Summary
AbstractPolicyOperator()
           
 
Method Summary
 void addPolicyComponent(PolicyComponent component)
          Add a PolicyComponent to the PolicyOperator.
 void addPolicyComponents(java.util.List components)
           
 boolean equal(PolicyComponent policyComponent)
          Returns true if the argument is equal to self.
 PolicyComponent getFirstPolicyComponent()
           
 java.util.List getPolicyComponents()
          Returns a List of PolicyComponents which this PolicyOperator contains.
 boolean isEmpty()
          Returns true if the PolicyOperator doesn't contain any PolicyComponents.
protected static Policy normalize(Policy policy, PolicyRegistry reg, boolean deep)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.neethi.PolicyComponent
getType, serialize
 

Field Detail

policyComponents

protected java.util.ArrayList policyComponents
Constructor Detail

AbstractPolicyOperator

public AbstractPolicyOperator()
Method Detail

addPolicyComponent

public void addPolicyComponent(PolicyComponent component)
Description copied from interface: PolicyOperator
Add a PolicyComponent to the PolicyOperator.

Specified by:
addPolicyComponent in interface PolicyOperator
Parameters:
component -

addPolicyComponents

public void addPolicyComponents(java.util.List components)

getPolicyComponents

public java.util.List getPolicyComponents()
Description copied from interface: PolicyOperator
Returns a List of PolicyComponents which this PolicyOperator contains.

Specified by:
getPolicyComponents in interface PolicyOperator
Returns:
the List of PolicyComponents that this PolicyOperator contains.

getFirstPolicyComponent

public PolicyComponent getFirstPolicyComponent()

isEmpty

public boolean isEmpty()
Description copied from interface: PolicyOperator
Returns true if the PolicyOperator doesn't contain any PolicyComponents.

Specified by:
isEmpty in interface PolicyOperator
Returns:
true if this PolicyOperator doesn't contain any PolicyComponenets

equal

public boolean equal(PolicyComponent policyComponent)
Description copied from interface: PolicyComponent
Returns true if the argument is equal to self.

Specified by:
equal in interface PolicyComponent
Parameters:
policyComponent - the PolicyComponent to check whether self is logically equal or not
Returns:
ture if the argument is equal to self.

normalize

protected static Policy normalize(Policy policy,
                                  PolicyRegistry reg,
                                  boolean deep)


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.