com.ibm.policy.manager
Interface PolicyManagerService


public interface PolicyManagerService

Portal service to query the Policy server side system for applicable Policy Value Sets. Policy Value Sets are used within applications to add variability in behavior defending on the attribute values in the Policy Value Set The portal service is accessed via a JNDI lookup using the lookup name "portal:service/policy/PolicyManager". It is recommended to perform the JNDI lookup in the init() method of a servlet and store the PolicyManagerService object in an instance variable. Note that the PolicyManagerService is not dependent on request attributes and it is permitted to access references to the actual service for longer than one request.
Coding example for accessing this service:

 
  
       PolicyManagerService pms;
       javax.naming.Context ctx = new javax.naming.InitialContext();
       try {
            pms = (PolicyManagerService) 
               ctx.lookup("portal:service/policy/PolicyManager");
       } catch(javax.naming.NameNotFoundException ex) {
            ... error handling ...
       }
       ...
       // request the service via the home interface
       PolicyManager service = pms.getPolicyManager();
  
   
  
 
The returned PolicyManagerService object is valid for the lifetime of the portal. It is recommended to perform the JNDI lookup in the init() method of a Servlet and store the PolicyManagerService object in an instance variable.

Since:
6.0

Method Summary
 com.ibm.policy.manager.PolicyManager getPolicyManager()
          Retrieve the PolicyManager instance
 

Method Detail

getPolicyManager

com.ibm.policy.manager.PolicyManager getPolicyManager()
Retrieve the PolicyManager instance

Returns:
singleton PolicyManager instance