Skip navigation links


oracle.idm.provisioning.approval
Class ExtProcApprovalStrategy

java.lang.Object
  extended by oracle.idm.provisioning.approval.ApprovalStrategy
      extended by oracle.idm.provisioning.approval.ExtProcApprovalStrategy


public class ExtProcApprovalStrategy
extends ApprovalStrategy

Field Summary

 

Fields inherited from class oracle.idm.provisioning.approval.ApprovalStrategy
APPROVER_ROLE, CONTEXT_KEY_DEBUG, CONTEXT_KEY_SESSION, DATA_FROM_APPROVED_REQ, m_cache, m_cachedPolicies, m_dirctx, m_source, ORIGINATOR_ROLE, requestBase, SYSTEM_APPROVER, USER_ACTION_APPROVE, USER_ACTION_CANCEL, USER_ACTION_REJECT

 

Constructor Summary
ExtProcApprovalStrategy()
           

 

Method Summary
 ModRequest approveForLevel(java.lang.String id, java.lang.String app, java.lang.String processor, int atlevel, int nextlevel)
          Approve a given request at the given level.
 void approveRequest(java.lang.String id, java.lang.String app, java.lang.String processor)
          Approve a given request.
 ApprovalCheckContext checkForApproval(RequestOperationData opdata, java.lang.Object dataCtx)
          If approval is needed for this request, starts the approval process.
 java.util.List getAllApprovers(java.lang.String user, java.lang.String id, java.lang.String app)
          Gets approver lists for all levels of a given request.
 java.util.List getAllowedActions(java.lang.String user, java.lang.String id, java.lang.String app)
          Returns actions a user can perform on a given request.
 Approvers getApproversForLevel(java.lang.String user, java.lang.String id, java.lang.String app, int level)
          Gets approver list for a given request for a given level.
 Request getRequest(java.lang.String user, java.lang.String id, java.lang.String app)
          Gets a given request only if user is a requestor/ valid approver for the request at its current approval level.
 java.util.List getRequestsForUser(java.lang.String user, RequestSearchCriteria criteria, java.lang.String userrole)
          Gets requests created by this user/ pending for this user that meet the specified criteria.
 java.util.List getRequestsToNotify(java.lang.String app, java.lang.Object ctx)
          Get all the requests that need to be sent to this app, in a format understood by the caller.
protected  Request preProcessRequest(java.lang.String id, java.lang.String app, java.lang.String processor)
          PROTECTED METHODS
 java.lang.Object processRequest(java.lang.Object evt, java.lang.String targetApp, java.lang.String sourceApp, java.lang.Object evtCtx)
          Process request based on given object.
 void rejectRequest(java.lang.String id, java.lang.String app, java.lang.String processor)
          Reject a given request.
 void updateNotifiedRequest(java.lang.String id, java.lang.String app)
          Update status of requests.

 

Methods inherited from class oracle.idm.provisioning.approval.ApprovalStrategy
cachePolicies, cancelRequest, changeRequestProcessingStatus, changeRequestStatus, changeRequestStatuses, checkUserAccess, clearCache, getAllActions, getApprovalPolicies, getApprovers, getApproversForLevel, getCreatedRequests, getPendingRequestsToApprove, getRequest, getRequestStatus, getRequestsWCriteria, getRequestsWProcStatus, isAdmin, isApprovalNeeded, isApprovalNeeded, isComplete, isMatch, isValidApprover, resolveApproverRole, setApprovalStrategyContext, setDirectoryCtx, storeRequest

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ExtProcApprovalStrategy

public ExtProcApprovalStrategy()

Method Detail

checkForApproval

public ApprovalCheckContext checkForApproval(RequestOperationData opdata,
                                             java.lang.Object dataCtx)
                                      throws javax.naming.NamingException,
                                             InvalidRequestException,
                                             ApprovalProcessException
If approval is needed for this request, starts the approval process.
Specified by:
checkForApproval in class ApprovalStrategy
Parameters:
rdata - Operational data for the request.
dataCtx - Optional: Specifies a context for the data that may be used by some strategies for additional checks.
Returns:
ApprovalCheckContext for the approval check. If approval is needed and a request was created, the context will include information about the request.
Throws:
javax.naming.NamingException
InvalidRequestException
ApprovalProcessException
See Also:
RequestOperationData

processRequest

public java.lang.Object processRequest(java.lang.Object evt,
                                       java.lang.String targetApp,
                                       java.lang.String sourceApp,
                                       java.lang.Object evtCtx)
                                throws java.lang.IllegalArgumentException,
                                       javax.naming.NamingException,
                                       ApprovalProcessException
Description copied from class: ApprovalStrategy
Process request based on given object. This method is useful for approval strategies that interact with other applications and may exchange data in a different format.
Specified by:
processRequest in class ApprovalStrategy
Parameters:
evt - Event or request information that needs to be processed.
targetApp - Target application against which this event/ request is taking place.
sourceApp - Source application from which this event/ request originated.
evtCtx - Optional argument depending on specific strategy implementation.
Returns:
A status object if event processed, else returns null.
Throws:
java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException

approveForLevel

public ModRequest approveForLevel(java.lang.String id,
                                  java.lang.String app,
                                  java.lang.String processor,
                                  int atlevel,
                                  int nextlevel)
                           throws java.lang.IllegalArgumentException,
                                  javax.naming.NamingException,
                                  ApprovalProcessException
Approve a given request at the given level. Throws ApprovalProcessException if: 1. The request is already approved or rejected or cancelled 2. The user does not have permission to approve the request 3. Current level of request > level at which the request is being approved.
Specified by:
approveForLevel in class ApprovalStrategy
Parameters:
id - Id of the request to be approved.
app - Target application of the request.
processorID - Identity of the user trying to approve the
atlevel - Level at which the request needs to be approved.
nextlevel - Next approval level for the request. Note, nextLevel is required for externalized approval processes, in case for whatever reasons, in-between approval levels are skipped (by escalating/ changing processing logic.). This gives the external process flexibility and doesn't restrict it to approve a request for each level.
Returns:
A ModRequest object with a record of all changes made to the request.
Throws:
java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException

approveRequest

public void approveRequest(java.lang.String id,
                           java.lang.String app,
                           java.lang.String processor)
                    throws java.lang.IllegalArgumentException,
                           javax.naming.NamingException,
                           ApprovalProcessException
Approve a given request. If the request is already approved or rejected or if the user does not have permission to approve the request, throws ApprovalProcessException.
Specified by:
approveRequest in class ApprovalStrategy
Parameters:
id - Id of the request to be approved.
app - Target application of the request.
processorID - Identity of the user trying to approve the request.
Throws:
java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException

rejectRequest

public void rejectRequest(java.lang.String id,
                          java.lang.String app,
                          java.lang.String processor)
                   throws java.lang.IllegalArgumentException,
                          javax.naming.NamingException,
                          ApprovalProcessException
Reject a given request. If the request is already approved or rejected or if the user does not have permission to approve the request, throws ApprovalProcessException.
Specified by:
rejectRequest in class ApprovalStrategy
Parameters:
id - Id of the request to be rejected.
app - Target application of the request.
processorID - Identity of the user trying to reject the request.
Throws:
java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException

getRequestsToNotify

public java.util.List getRequestsToNotify(java.lang.String app,
                                          java.lang.Object ctx)
                                   throws java.lang.IllegalArgumentException,
                                          javax.naming.NamingException,
                                          ApprovalProcessException
Description copied from class: ApprovalStrategy
Get all the requests that need to be sent to this app, in a format understood by the caller. This method can simply return a List of Requests or transform the requests into application specific format.
Specified by:
getRequestsToNotify in class ApprovalStrategy
Parameters:
app - Application to which the requests are notified.
ctx - Application specific context. The format of context is left to subclasses.
Returns:
A list of requests that should be notified to the application.
Throws:
java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException
See Also:
Request

updateNotifiedRequest

public void updateNotifiedRequest(java.lang.String id,
                                  java.lang.String app)
                           throws java.lang.IllegalArgumentException,
                                  javax.naming.NamingException,
                                  ApprovalProcessException
Description copied from class: ApprovalStrategy
Update status of requests. The format of object in the list is left to the implementation.
Specified by:
updateNotifiedRequest in class ApprovalStrategy
Throws:
java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException

getRequestsForUser

public java.util.List getRequestsForUser(java.lang.String user,
                                         RequestSearchCriteria criteria,
                                         java.lang.String userrole)
                                  throws javax.naming.NamingException,
                                         ApprovalProcessException
Gets requests created by this user/ pending for this user that meet the specified criteria.
Specified by:
getRequestsForUser in class ApprovalStrategy
Parameters:
user - Identity of the user for whom the requests are to be obtained.
attrs - A map specifying further criteria for the requests. The key to the map is one of the SRCH_* public strings defined in the Request object. The value is a collection of Strings, specifying search criteria.
userrole - One of the REQUSTOR_ROLE/ APPROVER_ROLE.
Returns:
A collection of requests meeting the specified criteria.
Throws:
javax.naming.NamingException
ApprovalProcessException
See Also:
Request, RequestSearchCriteria

getRequest

public Request getRequest(java.lang.String user,
                          java.lang.String id,
                          java.lang.String app)
                   throws javax.naming.NamingException,
                          ApprovalProcessException
Gets a given request only if user is a requestor/ valid approver for the request at its current approval level.
Specified by:
getRequest in class ApprovalStrategy
Parameters:
user - Id of the user doing the get operation.
id - Id of the request to be obtained.
app - Target application for the request.
Returns:
Request matching the id and app.
Throws:
javax.naming.NamingException
ApprovalProcessException
See Also:
Request

getApproversForLevel

public Approvers getApproversForLevel(java.lang.String user,
                                      java.lang.String id,
                                      java.lang.String app,
                                      int level)
                               throws javax.naming.NamingException,
                                      ApprovalProcessException
Gets approver list for a given request for a given level. This method is abstract so that in case approvals are entirely handled by a another application (such as APS), then we won't maintain approver information.
Specified by:
getApproversForLevel in class ApprovalStrategy
Parameters:
user - Identity of the user doing this operation.
id - Id of the request for which approvers are needed.
app - Target application for the request.
level - Level for which the approver list is required.
Returns:
Approvers for the given request for the given level.
Throws:
javax.naming.NamingException
ApprovalProcessException
See Also:
Approvers

getAllApprovers

public java.util.List getAllApprovers(java.lang.String user,
                                      java.lang.String id,
                                      java.lang.String app)
                               throws javax.naming.NamingException,
                                      ApprovalProcessException
Gets approver lists for all levels of a given request. This method is abstract so that in case approvals are entirely handled by a another application (such as APS), then we won't maintain approver information.
Specified by:
getAllApprovers in class ApprovalStrategy
Parameters:
user - Identity of the user doing this operation.
id - Id of the request for which approvers are needed.
app - Target application for the request.
Returns:
A collection of Approvers for the given request, sorted by approval level in ascending order.
Throws:
javax.naming.NamingException
ApprovalProcessException
See Also:
Approvers

getAllowedActions

public java.util.List getAllowedActions(java.lang.String user,
                                        java.lang.String id,
                                        java.lang.String app)
                                 throws javax.naming.NamingException,
                                        ApprovalProcessException
Returns actions a user can perform on a given request. Returns an empty list if the request is already approved/ rejected or cancelled.
Specified by:
getAllowedActions in class ApprovalStrategy
Parameters:
user - Identity of the user doing this operation.
id - Id of the request for which approvers are needed.
app - Target application for the request.
Returns:
A list of allowed actions (as defined in USER_ACTION* public strings).
Throws:
javax.naming.NamingException
ApprovalProcessException

preProcessRequest

protected Request preProcessRequest(java.lang.String id,
                                    java.lang.String app,
                                    java.lang.String processor)
                             throws java.lang.IllegalArgumentException,
                                    javax.naming.NamingException,
                                    ApprovalProcessException
PROTECTED METHODS
Throws:
java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException

Skip navigation links