|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.wsspi.security.policy.AbstractPolicies
public abstract class AbstractPolicies
This is the default implementation of the WSPolicy interface.
Subclasses may override isComplete()
to implement the appropriate
semantics for the policy domain of concern, e.g. role-based access control, rule-based authorization, etc.
Constructor Summary | |
---|---|
AbstractPolicies()
|
Method Summary | |
---|---|
void |
add(WSPolicy policy)
Adds the given policy to this WSPolicy instance. |
java.lang.Object |
getExtensionAdapter(java.lang.Class clz)
Returns an object that is an instance of the given class/interface or null if no such extension adapter is available. |
boolean |
isComplete()
Default implementation returns true if isComplete() in all
nested WSPolicy instances of this WSPolicy return true. |
java.util.Iterator<WSPolicy> |
iterator()
|
void |
remove(WSPolicy policy)
Removes the given WSPolicy from the list of immediate child WSPolicy instances. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractPolicies()
Method Detail |
---|
public void add(WSPolicy policy)
WSPolicy
add
in interface WSPolicy
policy
- to be added to this WSPolicy instance.public java.lang.Object getExtensionAdapter(java.lang.Class clz)
Extensible
getExtensionAdapter
in interface Extensible
clz
- the adapter class to be found.
public boolean isComplete()
isComplete()
in all
nested WSPolicy instances of this WSPolicy return true.
Subclasses should override this operation to provide appropriate semantics as required. A WSPolicy is generally considered to be complete when all metadata necessary to evaluate or process the policy has been collected. The metadata is collected from annotations or XML documents. For example, if a SCDL document for a component contains "RunAs" and "PermitAll" definitions, it is not necessary to retrieve the corresponding language annotations from the component implementation class or any of the methods because SCDL definitions override language annotations. In this case, the WSPolicy instance is logically complete, regardless of whether or not all the child WSPolicy instances are complete or not.
isComplete
in interface WSPolicy
isComplete()
in all contained WSPolicy instances returns true.public java.util.Iterator<WSPolicy> iterator()
iterator
in interface java.lang.Iterable<WSPolicy>
public void remove(WSPolicy policy)
Default implementation removes only the immediate child policy instances
found in the policies
member List. If it is desirable to
remove all nested policy instances, subclasses can override this method,
and iterate thru all child policies and remove all policies found using
the iterator.remove() method, as illustrated below.
Iterator<WSPolicy> iter = this.iterator(); while (iter.hasNext()) { WSPolicy child = iter.next(); if (child.equals(policy)) { iter.remove(); } }
remove
in interface WSPolicy
policy
- to be removed from this WSPolicy instance.public java.lang.String toString()
toString
in class java.lang.Object
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |