public interface AccessPolicyService
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createAccessPolicy(AccessPolicy policy)
Creates an Access Policy.
|
void |
deleteAccessPolicy(java.lang.String id,
boolean revoke)
Deletes an Access Policy.
|
void |
evalutePoliciesForUser(java.lang.String userKey)
Trigger access policy evaluation for the given user.
|
java.util.List |
findAccessPolicies(SearchCriteria searchCriteria,
java.util.Map configParams)
Searches Access Policy.
|
AccessPolicy |
getAccessPolicy(java.lang.String id,
boolean populateDefaultData)
Gets an Access Policy.
|
java.util.List |
getAccessPolicyDefaultChildData(java.lang.String policyID,
java.lang.String policyElementID,
long appInstanceID,
java.lang.String childFormName,
SearchCriteria searchCriteria,
java.util.Map configParams)
Gets the default child data of a given form of an Access Policy element.
|
DefaultData |
getAccessPolicyDefaultData(java.lang.String policyID,
java.lang.String policyElementID,
boolean populateChildData)
Gets the default data of an Access Policy element.
|
java.util.List |
getAssignedRoles(long polKey) |
int |
getLowestPriority()
Returns the lowest priority of all access policies defined.
|
void |
updateAccessPolicy(AccessPolicy policy)
Updates an Access Policy.
|
void evalutePoliciesForUser(java.lang.String userKey) throws NoSuchUserException, AccessPolicyEvaluationUnauthorizedException, AccessPolicyServiceException, AccessPolicyEvaluationException
userKey
- - Key of the user for whom access policy evaluation is to be triggered.NoSuchUserException
- if user identified by userKey doesn't existAccessPolicyEvaluationUnauthorizedException
- if the user initiating the access
policy evaluation doesn't have the necessary privileges.AccessPolicyEvaluationException
- if an error occurred while evaluating access
policies for the userAccessPolicyServiceException
- if any other generic error occurs. The embedded
exception indicates the root cause.AccessPolicy getAccessPolicy(java.lang.String id, boolean populateDefaultData) throws AccessDeniedException, AccessPolicyServiceException
id
- - the access policy ID.-
- if the default data should be populated. true means it should populate the default data, false otherwise.
Only populate the default data when needed as populating the default data might take some time depends on
the number of attributes.AccessDeniedException
- if logged in user is not authorized to perform this operation.AccessPolicyServiceException
- if any other generic error occurs. The embedded exception indicates the root cause.java.util.List findAccessPolicies(SearchCriteria searchCriteria, java.util.Map configParams) throws AccessDeniedException, AccessPolicyServiceException
searchCriteria
- - the search criteria.configParams
- - the parameters to further configure the search operation. There are four configuration
parameters: start, end, sortAttrName, and order.AccessDeniedException
- if logged in user is not authorized to perform this operation.AccessPolicyServiceException
- if any other generic error occurs. The embedded exception indicates the root cause.DefaultData getAccessPolicyDefaultData(java.lang.String policyID, java.lang.String policyElementID, boolean populateChildData) throws AccessDeniedException, AccessPolicyServiceException
policyID
- - the access policy ID.policyElementID
- - the access policy element ID.populateChildData
- - if the child data should be populated. true means it should populate the child data,
false otherwise.AccessDeniedException
- if logged in user is not authorized to perform this operation.AccessPolicyServiceException
- if any other generic error occurs. The embedded exception indicates the root cause.java.util.List getAccessPolicyDefaultChildData(java.lang.String policyID, java.lang.String policyElementID, long appInstanceID, java.lang.String childFormName, SearchCriteria searchCriteria, java.util.Map configParams) throws AccessDeniedException, AccessPolicyServiceException
policyID
- - the access policy ID.policyElementID
- - the access policy element ID.appInstanceID
- - the application instance ID.childFormName
- - the child form name.searchCriteria
- - the search criteria.configParams
- - the parameters to further configure the search operation. There are four configuration
parameters: start, end, sortAttrName, and order.AccessDeniedException
- if logged in user is not authorized to perform this operation.AccessPolicyServiceException
- if any other generic error occurs. The embedded exception indicates the root cause.java.lang.String createAccessPolicy(AccessPolicy policy) throws AccessDeniedException, AccessPolicyServiceException
policy
- - access policy to be created.AccessDeniedException
- if logged in user is not authorized to perform this operation.AccessPolicyServiceException
- if any other generic error occurs. The embedded exception indicates the root cause.void updateAccessPolicy(AccessPolicy policy) throws AccessDeniedException, AccessPolicyServiceException
policy
- - access policy to be updated.AccessDeniedException
- if logged in user is not authorized to perform this operation.AccessPolicyServiceException
- if any other generic error occurs. The embedded exception indicates the root cause.void deleteAccessPolicy(java.lang.String id, boolean revoke) throws AccessDeniedException, AccessPolicyServiceException
id
- - ID of the access policy to be deleted.revoke
- - if accounts granted by this access policy should be revoked.AccessDeniedException
- if logged in user is not authorized to perform this operation.AccessPolicyServiceException
- if any other generic error occurs. The embedded exception indicates the root cause.int getLowestPriority() throws AccessPolicyServiceException
AccessPolicyServiceException
- if any error occurs. The embedded exception indicates the root cause.java.util.List getAssignedRoles(long polKey) throws NoSuchPolicyException
NoSuchPolicyException