Skip navigation links


oracle.iam.request.api
Interface ApprovalPolicyService


public interface ApprovalPolicyService

Approval policy service is used for managing approval policies and its related operations . This service allows

Below is the code snippet that shows how to get an instance of this service:
//returns an approval policy service instance
ApprovalPolicyService approvalPolicyService = Platform.getService(ApprovalPolicyService.class);
// Create an approval policy.
List<String> templateNames = approvalPolicyService.createApprovalPolicy(anApprovalPolicy);
....


Method Summary
 java.lang.String createApprovalPolicy(ApprovalPolicy appPolicy)
          Create an approval policy
 boolean deleteApprovalPolicy(java.util.List appPolicyKeys)
          Deletes approval policies
 java.util.List getApprovalRuleEntity(java.lang.String modelname, java.lang.String policyLevel, boolean isAllScope)
          Provided a request modelname, it returns a list of entity to construct simple rule
 java.util.List getDatasetNames(java.lang.String ApprovalPolicyName)
          Provided an Approval Policy name, it returns the list of dataset file name corresponding to the request model that policy is associated with
 boolean modifyApprovalPolicy(ApprovalPolicy appPolicy)
          Modify an approval policy
 java.util.List search(ApprovalPolicySearchCriteria searchParams)
          Retrieves the Approval Policy that matches the specified criteria.

 

Method Detail

createApprovalPolicy

java.lang.String createApprovalPolicy(ApprovalPolicy appPolicy)
                                      throws ApprovalPolicyServiceException
Create an approval policy
Parameters:
appPolicy - value object containing policy information
Returns:
approval policy key
Throws:
ApprovalPolicyServiceException - if data validation or creation fails

modifyApprovalPolicy

boolean modifyApprovalPolicy(ApprovalPolicy appPolicy)
                             throws ApprovalPolicyServiceException,
                                    oracle.iam.platform.kernel.StaleDataException
Modify an approval policy
Parameters:
appPolicy - value object containing policy information
Returns:
true if modification succeeded, else returns false
Throws:
ApprovalPolicyServiceException - if data validation or modification fails
oracle.iam.platform.kernel.StaleDataException

deleteApprovalPolicy

boolean deleteApprovalPolicy(java.util.List appPolicyKeys)
                             throws ApprovalPolicyServiceException
Deletes approval policies
Parameters:
List - of Approval Policy keys to be deleted
Returns:
true if deletion of all policies succeeded, else returns false
Throws:
ApprovalPolicyServiceException - if data validation or deletion fails

search

java.util.List search(ApprovalPolicySearchCriteria searchParams)
                      throws ApprovalPolicyServiceException
Retrieves the Approval Policy that matches the specified criteria. This API takes permissions into consideration and only approval policy administrators can search the approval policies.
Parameters:
searchParams - - search criteria

Below is the list of allowed search parameters


//Search approval polices based on the criteria
//returns an Approval policy service instance
ApprovalPolicyService approvalPolicyService = Platform.getService(ApprovalPolicyService.class);
//gets a list of approval policy
List<ApprovalPolicy> approvalPolicies = approvalPolicyService.search(searchCriteria)
Returns:
list of ApprovalPolicy objects based on search criteria
Throws:
ApprovalPolicyServiceException

getApprovalRuleEntity

java.util.List getApprovalRuleEntity(java.lang.String modelname,
                                     java.lang.String policyLevel,
                                     boolean isAllScope)
                                     throws ApprovalPolicyServiceException
Provided a request modelname, it returns a list of entity to construct simple rule
Parameters:
modelname - - Request Model Name
policyLevel - - Approval Policy Level i.e. Request Level/Operation Level
isAllScope - - true if scope type is ALL SCOPE
Returns:
List of entity names
Throws:
ApprovalPolicyServiceException

getDatasetNames

java.util.List getDatasetNames(java.lang.String ApprovalPolicyName)
                               throws ApprovalPolicyServiceException
Provided an Approval Policy name, it returns the list of dataset file name corresponding to the request model that policy is associated with
Parameters:
ApprovalPolicyName - - Approval Policy name
Returns:
A list of dataset file name
Throws:
ApprovalPolicyServiceException

Skip navigation links


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.