|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PolicyManager
The PolicyManager
interface defines a mechanism to register policies with
the Rights Management service and to
search and modify policies that are already registered. The user account used to invoke LiveCycle ES2
determines which policies can be accessed.
Registered policies reside in the LiveCycle ES2 database. To modify a registered policy, you must first retrieve the policy. For information, see the Modifying a policy using the Java API quick start in Programming with LiveCycle ES4.
Method Summary | |
---|---|
void |
changePolicyOwner(java.lang.String policyName,
User existingOwner,
User newOwner)
Changes the owner of the policy. |
void |
deleteMyPolicy(java.lang.String policyName,
java.lang.String ownerUsername,
java.lang.String ownerDomain)
Deletes the specified policy in My Policies. |
void |
deletePolicy(java.lang.String policySetName,
java.lang.String policyName)
Deletes the specified policy. |
java.lang.String[] |
getAllPolicySetNames()
Returns all policy set names that are available to user as a document publisher. |
Policy |
getMyPolicy(java.lang.String policyName,
java.lang.String OwnerUsername,
java.lang.String ownerDomain)
Retrieves the specified policy in My Policies from the Rights Management database. |
Policy[] |
getPolicies(PolicySearchFilter filter,
int maxResults)
Returns Policy objects based on the specified search criteria. |
Policy |
getPolicy(java.lang.String policyId)
Retrieves the specified policy from the Rights Management database. |
Policy |
getPolicy(java.lang.String policySetName,
java.lang.String policyName)
Retrieves the specified policy from the Rights Management database. |
Policy |
getPolicyByAlternateId(java.lang.String alternateId)
Retrieves the policy that corresponds with the specified alternate identification. |
java.lang.String[] |
getPolicyNames(java.lang.String policySetName)
Returns all policy set names that are available to user as a document publisher. |
java.lang.String |
registerPolicy(Policy policy)
Registers the specified policy with the Rights Management service as a user policy in My Policies policy set. |
java.lang.String |
registerPolicy(Policy policy,
java.lang.String policySetName)
Registers the provided policy with the Rights Management service. |
void |
updatePolicy(Policy updatedPolicy)
Updates an existing policy with the properties defined in a new policy definition. |
Method Detail |
---|
java.lang.String registerPolicy(Policy policy) throws SDKException
registerPolicy
method registers are enabled by default.
policy
- A new policy to register with the Rights Management service.
SDKException
- if any of the following conditions occur:
java.lang.String registerPolicy(Policy policy, java.lang.String policySetName) throws SDKException
policySetName
parameter is null, then the
policy is registered in the My Policies policy set.
To see this method used in a code example, see the Creating a policy using the Java API quick start in Programming with LiveCycle ES4.
policy
- A new policy to register with the Rights Management service.policySetName
- The name of the policy set that stores the policy.
SDKException
- if any of the following conditions occur:
void deletePolicy(java.lang.String policySetName, java.lang.String policyName) throws SDKException
To see this method used within a code example, see the Deleting a policy using the Java API quick start in Programming with LiveCycle ES4.
policySetName
- The name of the policy set that contains the policy. If this parameter is null,
then the My Policies policy set is used.policyName
- The name of the policy to delete.
SDKException
- If any of the following conditions occur:
Policy
void deleteMyPolicy(java.lang.String policyName, java.lang.String ownerUsername, java.lang.String ownerDomain) throws SDKException
policyName
- The name of the policy to delete.ownerUsername
- The login identification of the policy owner of the policy to delete.ownerDomain
- The domain identification of the policy owner of the policy to delete.
SDKException
- If any of the following conditions occur:
Policy
void updatePolicy(Policy updatedPolicy) throws SDKException
To see this method used within a code example, see the Modifying a policy using the Java API quick start in Programming with LiveCycle ES4.
updatedPolicy
- A Policy
object that represents the policy to update. The policy was
previously retrieved and modified as required.
SDKException
- if any of the following conditions occur:
PolicyManager.getPolicy(java.lang.String, java.lang.String)
,
PolicyManager.getPolicies(com.adobe.livecycle.rightsmanagement.client.infomodel.PolicySearchFilter, int)
Policy getPolicy(java.lang.String policySetName, java.lang.String policyName) throws SDKException
To see this method used within a code example, see the Modifying a policy using the Java API quick start in Programming with LiveCycle ES4.
policySetName
- The name of the policy set that contains the policy. If policySetName
is null
then the My Policies policy set is used.policyName
- The name of the policy to retrieve.
Policy
object that corresponds to the specified policy name and policy set name.
SDKException
- if any of the following conditions occur:
Policy getMyPolicy(java.lang.String policyName, java.lang.String OwnerUsername, java.lang.String ownerDomain) throws SDKException
policyName
- The name of the policy to retrieve.OwnerUsername
- The login identification of the policy owner of the policy to retrieve.ownerDomain
- The domain identification of the policy owner of the policy to retrieve.
Policy
object that corresponds to the specified policy name, owner user name and owner domain.
SDKException
- if any of the following conditions occur:
Policy getPolicy(java.lang.String policyId) throws SDKException
policyId
- The unique identifier of the policy.
Policy
object that corresponds to the specified policy identifier.
SDKException
- if any of the following conditions occur:
Policy[] getPolicies(PolicySearchFilter filter, int maxResults) throws SDKException
Policy
objects based on the specified search criteria.
You can specify the maximum number of policy objects to return.
If USER_POLICY
is specified in filter
, getPolicies
returns
all policies for the user who is currently logged in.
If no search criteria are specified, all organizational and user policies for the currently logged
in user (up to the maximum number of results specified) are returned. That is, if for example, the value
5 is specified, then this method returns up to 5 user and 5 organizational policies.
If the maxResults
value is an extremely large number, an exception may occur.
Different databases have different limitations. For example, 50000000 is a limitation for the MySQL database.
filter
- A PolicySearchFilter
object that defines the search criteria.maxResults
- An integer that specifies the maximum number of objects to return.
Policy
objects that match the search criteria.
If there are no policies that match the search criteria, then this method
returns only one element which is null.
SDKException
- if any of the following conditions occur:
PolicySearchFilter
Policy getPolicyByAlternateId(java.lang.String alternateId) throws SDKException
alternateId
- A string value that holds the alternate identification of a policy.
The maximum length of the String
you can use is 250 characters or errors can occur.
Policy
object that corresponds with the specified alternateId
.
Returns null if no policy is found.
SDKException
- if any of the following conditions occur:
PolicySearchFilter
void changePolicyOwner(java.lang.String policyName, User existingOwner, User newOwner) throws SDKException
policyName
- The name of the policy that will have its owner changed.existingOwner
- A User
object that has current ownership of the policy.newOwner
- A User
object to provide ownership of the policy.
SDKException
- if any of the following conditions occur:
java.lang.String[] getAllPolicySetNames() throws SDKException
SDKException
- if any of the following conditions occur:
java.lang.String[] getPolicyNames(java.lang.String policySetName) throws SDKException
policySetName
- The name of the policy set that will contain policies.
"MyPolicies" should be passed if it's end user policies.
SDKException
- if any of the following conditions occur:
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |