|
|||||||||
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 Adobe Experience Manager Forms
determines which policies can be accessed.
Registered policies reside in the Adobe Experience Manager Forms 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 Adobe Experience Manager Forms.
Method Summary | |
---|---|
void |
changePolicyOwner(java.lang.String policyName,
User existingOwner,
User newOwner)
Changes the owner of the policy. |
java.lang.String |
createPolicySet(PolicySet policySet)
This method creates a PolicySet, Creating a lot of PolicySets will have adverse performance effects. |
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.util.HashMap |
deletePolicySets(java.util.List ids)
This method deletes all policySets whose ids have been set as argument |
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 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 database. |
Policy |
getPolicy(java.lang.String policySetName,
java.lang.String policyName)
Retrieves the specified policy from the 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. |
PolicySet |
getPolicySet(java.lang.String policySetId,
boolean fetchPolicies)
This method returns PolicySet details for the provided policySetId and if fetchPolicies is set to true, it bring details of all policies under it. |
java.lang.String |
getPolicySetIdByPolicySetName(java.lang.String policySetName)
This method get the PolicySetId corresponding to the PolicySetName |
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 |
updateCoordinatorPermission(java.lang.String userId,
java.lang.String policySetId,
java.util.ArrayList perms)
This method helps update Coordinator's (userId) Permissions (perms) for a given policySetId |
void |
updatePolicy(Policy updatedPolicy)
Updates an existing policy with the properties defined in a new policy definition. |
void |
updatePolicySetCoordinators(java.lang.String policysetId,
java.util.ArrayList userIdAndPermsList,
boolean add)
This method helps add/remove Coordinators on a given policySet |
void |
updatePolicySetInfo(java.lang.String name,
java.lang.String desc,
java.lang.String policySetId)
This method updates the information for the given PolicySetId |
void |
updatePolicySetPublishers(java.lang.String policysetId,
java.util.ArrayList userIds,
boolean add)
This method helps add/remove Publishers on a given policySet |
void |
updatePolicySetVisibleUsersGroups(java.lang.String policysetId,
java.util.ArrayList userIds,
boolean add)
This method helps add/remove VisibleUsersGroups on a given policySet |
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 Adobe Experience Manager Forms.
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 Adobe Experience Manager Forms.
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 Adobe Experience Manager Forms.
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 Adobe Experience Manager Forms.
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:
PolicySet getPolicySet(java.lang.String policySetId, boolean fetchPolicies) throws SDKException
policySetId
- Id of the PolicySet whose information needs to be fetchedfetchPolicies
- if set to true, it will bring details of all policies under it
SDKException
java.lang.String createPolicySet(PolicySet policySet) throws SDKException
PolicySet
- this object encapsulates all details related to PolicySet minus policies under it
SDKException
void updatePolicySetInfo(java.lang.String name, java.lang.String desc, java.lang.String policySetId) throws SDKException
name
- Updated Name of PolicySetdescription
- Updated description of the PolicySetpolicySetId
- of the PolicySet whose information needs to be updated
SDKException
java.lang.String getPolicySetIdByPolicySetName(java.lang.String policySetName) throws SDKException
policySetName
- name of the PolicySet
SDKException
java.util.HashMap deletePolicySets(java.util.List ids) throws SDKException
policySetIds
- of the policySets which needs to be deleted, if a policySetId does not exist the system will throw SDKException
SDKException
void updatePolicySetPublishers(java.lang.String policysetId, java.util.ArrayList userIds, boolean add) throws SDKException
policySetId
- id of the policySet whose publishers need to be modifieduserIds
- list of userIds which need to be added/removed from the policySet as publishersadd,
- a boolean which if set to true will add users as publishers, if set to false will delete those as publishers
SDKException
void updatePolicySetVisibleUsersGroups(java.lang.String policysetId, java.util.ArrayList userIds, boolean add) throws SDKException
policySetId
- id of the policySet whose VisibleUsersGroups need to be modifieduserIds
- list of userIds which need to be added/removed from the policySet as VisibleUsersGroupsadd,
- a boolean which if set to true will add users as VisibleUsersGroups, if set to false will delete those as VisibleUsersGroups
SDKException
void updatePolicySetCoordinators(java.lang.String policysetId, java.util.ArrayList userIdAndPermsList, boolean add) throws SDKException
policySetId
- id of the policySet whose Coordinators need to be modifieduserIdAndPermsList
- list of userIds and their permissions (com.adobe.livecycle.rightsmanagement.client.infomodel.PolicySetCoordinatorAndPerms)
which need to be added/removed from the policySet as Coordinatorsadd,
- a boolean which if set to true will add users as Coordinators, if set to false will delete those as Coordinators
SDKException
void updateCoordinatorPermission(java.lang.String userId, java.lang.String policySetId, java.util.ArrayList perms) throws SDKException
userId
- which will be added as co-ordinatorpolicySetId
- id of the policySet on which the user will we added as co-ordinatorperms,
- an ArrayList to be set as permissions for the co-ordinator (userId).
These would be amongst com.adobe.edc.server.constants.PolicyServerConstants.PolicySetAggregatePermissions, else it would throw an exception.
SDKException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |