Package com.sun.identity.policy
Class PolicyCache
- java.lang.Object
-
- com.sun.identity.policy.PolicyCache
-
- All Implemented Interfaces:
ServiceListener
public class PolicyCache extends Object implements ServiceListener
The classPolicyCachemanages policy cache for the policy framework.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPOLICY_STATS-
Fields inherited from interface com.sun.identity.sm.ServiceListener
ADDED, MODIFIED, REMOVED
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfirePrivilegeChanged(String serviceName, Set affectedResourceNames, int changeType)Creates a policyEvent with the changed resource names and then invokes all the registered PolicyListeners to notify about the event.static PolicyCachegetInstance()Gets the singleton instance of PolicyCachevoidglobalConfigChanged(String serviceName, String version, String groupName, String serviceComponent, int changeType)This method will be invoked when a service's global configuation data has been changed.voidorganizationConfigChanged(String serviceName, String version, String orgName, String groupName, String serviceComponent, int changeType)This method will be invoked when a service's organization configuation data has been changed.voidschemaChanged(String serviceName, String version)This method will be invoked when a service's schema has been changed.voidsendPolicyChangeNotification(Policy oldPolicy, Policy newPolicy, int changeType)
-
-
-
Field Detail
-
POLICY_STATS
public static final String POLICY_STATS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static PolicyCache getInstance() throws PolicyException
Gets the singleton instance of PolicyCache- Returns:
- the singleton instance of policy cache
- Throws:
PolicyException- if error.
-
schemaChanged
public void schemaChanged(String serviceName, String version)
This method will be invoked when a service's schema has been changed.- Specified by:
schemaChangedin interfaceServiceListener- Parameters:
serviceName- name of the serviceversion- version of the service
-
globalConfigChanged
public void globalConfigChanged(String serviceName, String version, String groupName, String serviceComponent, int changeType)
This method will be invoked when a service's global configuation data has been changed. The parameter groupName denote the name of the configuration grouping (e.g. default) and serviceComponent denotes the service's sub-component that changed (e.g. /NamedPolicy, /Templates).- Specified by:
globalConfigChangedin interfaceServiceListener- Parameters:
serviceName- name of the serviceversion- version of the serviceserviceComponent- name of the service components that changedgroupName- name of the configuration grouping.changeType- change type, i.e., ADDED, REMOVED or MODIFIED.
-
organizationConfigChanged
public void organizationConfigChanged(String serviceName, String version, String orgName, String groupName, String serviceComponent, int changeType)
This method will be invoked when a service's organization configuation data has been changed. The parameters orgName, groupName and serviceComponent denotes the organization name, configuration grouping name and service's sub-component that are changed respectively.- Specified by:
organizationConfigChangedin interfaceServiceListener- Parameters:
serviceName- name of the serviceversion- version of the servicegroupName-orgName- organization name as DNserviceComponent- the name of the service components that changedchangeType- change type, i.e., ADDED, REMOVED or MODIFIED
-
sendPolicyChangeNotification
public void sendPolicyChangeNotification(Policy oldPolicy, Policy newPolicy, int changeType)
-
firePrivilegeChanged
public void firePrivilegeChanged(String serviceName, Set affectedResourceNames, int changeType)
Creates a policyEvent with the changed resource names and then invokes all the registered PolicyListeners to notify about the event. This is triggered when entitlement privilege is added, removed or modified.
-
-