com.sun.identity.policy.PolicyManager is the top-level administrator class for policy management. com.sun.identity.policy.PolicyManager provides methods that enable an administrator to create, modify, or delete realm policies. The PolicyManager can be obtained by passing a privileged user’s session token or by passing a privileged user’s session token with a realm name. Some of the more widely used methods of this class include the following:
Retrieves all named policies created for the realm for which the policy manager was instantiated. This method can also take a pattern (filter) as an argument.
Retrieves a policy when given the policy name.
Adds a policy to the specified realm. If a policy with the same name already exists, it will be overwritten.
Removes a policy from the specified realm.
Replaces policy with a new policy.