org.apache.ws.policy.util
Class PolicyRegistry

java.lang.Object
  extended byorg.apache.ws.policy.util.PolicyRegistry

public class PolicyRegistry
extends java.lang.Object

PolicyRegistry is useful to resolve any PolicyReferences to actual policies. It can optionally be passed as an argument to policy operations (i.e. normalize(...), merge(...) and intersect(...)) and any PolicyReference is resovled to actually Policy within that operations.


Constructor Summary
PolicyRegistry()
           
PolicyRegistry(PolicyRegistry parent)
           
 
Method Summary
 PolicyRegistry getParent()
           
 java.util.Iterator keys()
           
 Policy lookup(java.lang.String policyURI)
          Returns the Policy object which is uniquely identified by the policyURI String.
 void register(java.lang.String policyURI, Policy policy)
          Registers a Policy object with the specified policyURI.
 void setParent(PolicyRegistry parent)
           
 void unregister(java.lang.String policyURI)
          Unregisters a Policy object specified by the policyURI.
 java.util.Iterator values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyRegistry

public PolicyRegistry()

PolicyRegistry

public PolicyRegistry(PolicyRegistry parent)
Method Detail

setParent

public void setParent(PolicyRegistry parent)

getParent

public PolicyRegistry getParent()

lookup

public Policy lookup(java.lang.String policyURI)
              throws java.lang.IllegalArgumentException
Returns the Policy object which is uniquely identified by the policyURI String. Returns null if there is no Policy object with the specified policyURI. The policyURI should be the same as the String which returns when getPolicyURI() is invoked on returning Policy object.

Parameters:
policyURI - a String which uniquely indentifies the Policy
Returns:
a Policy object which has the same policyURI
Throws:
java.lang.IllegalArgumentException

register

public void register(java.lang.String policyURI,
                     Policy policy)
Registers a Policy object with the specified policyURI.

Parameters:
policyURI - the key which should be the policyURI of the Policy object
policy - the Policy object to register

unregister

public void unregister(java.lang.String policyURI)
Unregisters a Policy object specified by the policyURI.

Parameters:
policyURI - the policyURI of the Policy object to unregister

keys

public java.util.Iterator keys()

values

public java.util.Iterator values()


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.