|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.idm.provisioning.approval.ApprovalStrategy
public abstract class ApprovalStrategy
Field Summary | |
---|---|
static java.lang.String |
APPROVER_ROLE |
static java.lang.String |
CONTEXT_KEY_DEBUG |
static java.lang.String |
CONTEXT_KEY_SESSION |
static java.lang.String |
DATA_FROM_APPROVED_REQ |
protected boolean |
m_cache |
protected java.util.Hashtable |
m_cachedPolicies |
protected javax.naming.directory.DirContext |
m_dirctx |
protected java.lang.String |
m_source |
static java.lang.String |
ORIGINATOR_ROLE |
protected static java.lang.String |
requestBase |
static java.lang.String |
SYSTEM_APPROVER |
static java.lang.String |
USER_ACTION_APPROVE |
static java.lang.String |
USER_ACTION_CANCEL |
static java.lang.String |
USER_ACTION_REJECT |
Constructor Summary | |
---|---|
ApprovalStrategy() |
Method Summary | |
---|---|
abstract ModRequest |
approveForLevel(java.lang.String id, java.lang.String app, java.lang.String processorID, int atlevel, int nextlevel) Approve a given request at the given level. |
abstract void |
approveRequest(java.lang.String id, java.lang.String app, java.lang.String processorID) Approve a given request. |
void |
cachePolicies(boolean mode) Sets the caching mode. |
void |
cancelRequest(java.lang.String id, java.lang.String app, java.lang.String processor) Cancel a given request. |
protected void |
changeRequestProcessingStatus(java.lang.String id, java.lang.String app, java.lang.String status) |
protected void |
changeRequestStatus(java.lang.String id, java.lang.String app, java.lang.String status, java.lang.String approver) |
protected void |
changeRequestStatuses(java.lang.String id, java.lang.String app, java.lang.String status, java.lang.String approver, java.lang.String procstatus) |
abstract ApprovalCheckContext |
checkForApproval(RequestOperationData rdata, java.lang.Object dataCtx) If approval is needed for this request, starts the approval process. |
protected boolean |
checkUserAccess(java.lang.String user, Request req) |
boolean |
clearCache(java.lang.String key) Clear elemet(s) in cache. |
protected java.util.List |
getAllActions(java.lang.String user, Request req) |
abstract 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. |
abstract 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. |
protected java.util.List |
getApprovalPolicies(java.lang.String toApp, java.lang.String operation) |
protected java.util.List |
getApprovers(java.lang.String policyUid) |
protected Approvers |
getApproversForLevel(java.lang.String policyUid, int level) |
abstract 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. |
protected java.util.List |
getCreatedRequests(java.lang.String user, RequestSearchCriteria criteria, int flags) |
protected java.util.List |
getPendingRequestsToApprove(java.lang.String user, int flags) |
protected Request |
getRequest(java.lang.String id, java.lang.String app, int flags) |
abstract 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. |
abstract 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.lang.String |
getRequestStatus(java.lang.String id, java.lang.String app) Given a request, gets its status. |
abstract 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 java.util.List |
getRequestsWCriteria(RequestSearchCriteria criteria, int flags) |
protected java.util.List |
getRequestsWProcStatus(java.lang.String app, java.lang.String procstatus) |
protected boolean |
isAdmin(java.lang.String user) |
protected boolean |
isApprovalNeeded(RequestOperationData req) |
protected boolean |
isApprovalNeeded(RequestOperationData req, java.util.List policies) |
protected boolean |
isComplete(java.lang.String status) |
protected boolean |
isMatch(ApprovalPolicy pol, RequestOperationData opdata) |
protected boolean |
isValidApprover(Request req, java.lang.String approverDN) |
abstract 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. |
abstract void |
rejectRequest(java.lang.String id, java.lang.String app, java.lang.String processorID) Reject a given request. |
protected java.lang.String |
resolveApproverRole(java.lang.String name, java.lang.String userKey, java.util.List userInfo) |
void |
setApprovalStrategyContext(java.lang.String key, java.lang.Object ctx) Sets an approver context. |
void |
setDirectoryCtx(javax.naming.directory.DirContext ctx) Sets the directory context for approval strategy. |
protected java.lang.String |
storeRequest(Request req) |
abstract void |
updateNotifiedRequest(java.lang.String id, java.lang.String app) Update status of requests. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String SYSTEM_APPROVER
public static java.lang.String CONTEXT_KEY_DEBUG
public static java.lang.String CONTEXT_KEY_SESSION
public static java.lang.String ORIGINATOR_ROLE
public static java.lang.String APPROVER_ROLE
public static java.lang.String USER_ACTION_APPROVE
public static java.lang.String USER_ACTION_REJECT
public static java.lang.String USER_ACTION_CANCEL
public static java.lang.String DATA_FROM_APPROVED_REQ
protected static java.lang.String requestBase
protected javax.naming.directory.DirContext m_dirctx
protected boolean m_cache
protected java.util.Hashtable m_cachedPolicies
protected java.lang.String m_source
Constructor Detail |
---|
public ApprovalStrategy()
Method Detail |
---|
public abstract ApprovalCheckContext checkForApproval(RequestOperationData rdata, java.lang.Object dataCtx) throws javax.naming.NamingException, InvalidRequestException, ApprovalProcessException
rdata
- Operational data for the request.dataCtx
- Optional: Specifies a context for the data that may be used by some strategies for additional checks.javax.naming.NamingException
InvalidRequestException
ApprovalProcessException
RequestOperationData
public abstract 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
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.java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException
public abstract ModRequest approveForLevel(java.lang.String id, java.lang.String app, java.lang.String processorID, int atlevel, int nextlevel) throws java.lang.IllegalArgumentException, javax.naming.NamingException, ApprovalProcessException
id
- Id of the request to be approved.app
- Target application of the request.processorID
- Identity of the user trying to approve theatlevel
- 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.java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException
public abstract void approveRequest(java.lang.String id, java.lang.String app, java.lang.String processorID) throws java.lang.IllegalArgumentException, javax.naming.NamingException, ApprovalProcessException
id
- Id of the request to be approved.app
- Target application of the request.processorID
- Identity of the user trying to approve the request.java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException
public abstract void rejectRequest(java.lang.String id, java.lang.String app, java.lang.String processorID) throws java.lang.IllegalArgumentException, javax.naming.NamingException, ApprovalProcessException
id
- Id of the request to be rejected.app
- Target application of the request.processorID
- Identity of the user trying to reject the request.java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException
public abstract java.util.List getRequestsToNotify(java.lang.String app, java.lang.Object ctx) throws java.lang.IllegalArgumentException, javax.naming.NamingException, ApprovalProcessException
app
- Application to which the requests are notified.ctx
- Application specific context. The format of context is left to subclasses.java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException
Request
public abstract void updateNotifiedRequest(java.lang.String id, java.lang.String app) throws javax.naming.NamingException, ApprovalProcessException
reqObjects
- A collection of requests/ objects corresponding to requests that need to be updated.status
- Status with which the requests need to be updated.javax.naming.NamingException
ApprovalProcessException
public abstract java.util.List getRequestsForUser(java.lang.String user, RequestSearchCriteria criteria, java.lang.String userrole) throws javax.naming.NamingException, ApprovalProcessException
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.javax.naming.NamingException
ApprovalProcessException
Request
public abstract Request getRequest(java.lang.String user, java.lang.String id, java.lang.String app) throws javax.naming.NamingException, ApprovalProcessException
user
- Id of the user doing the get operation.id
- Id of the request to be obtained.app
- Target application for the request.javax.naming.NamingException
ApprovalProcessException
Request
public abstract Approvers getApproversForLevel(java.lang.String user, java.lang.String id, java.lang.String app, int level) throws javax.naming.NamingException, ApprovalProcessException
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.javax.naming.NamingException
ApprovalProcessException
Approvers
public abstract java.util.List getAllApprovers(java.lang.String user, java.lang.String id, java.lang.String app) throws javax.naming.NamingException, ApprovalProcessException
user
- Identity of the user doing this operation.id
- Id of the request for which approvers are needed.app
- Target application for the request.javax.naming.NamingException
ApprovalProcessException
Approvers
public abstract java.util.List getAllowedActions(java.lang.String user, java.lang.String id, java.lang.String app) throws javax.naming.NamingException, ApprovalProcessException
user
- Identity of the user doing this operation.id
- Id of the request for which approvers are needed.app
- Target application for the request.javax.naming.NamingException
ApprovalProcessException
public void setDirectoryCtx(javax.naming.directory.DirContext ctx)
ctx
- A valid directory context. This context is used to retrieve or store all information related to approval, so it should have necessary read and write permissions.public void cachePolicies(boolean mode)
mode
- Policies are cached if mode is true.public boolean clearCache(java.lang.String key)
key
- Key for which all cached policies will be cleared. If key is null, all elements in the cache are cleared.public void setApprovalStrategyContext(java.lang.String key, java.lang.Object ctx)
key
- Key/ name for the context.ctx
- Strategy specific context object.public java.lang.String getRequestStatus(java.lang.String id, java.lang.String app) throws javax.naming.NamingException, java.lang.IllegalArgumentException, ApprovalProcessException
id
- Request id.app
- Target application for the request.javax.naming.NamingException
java.lang.IllegalArgumentException
ApprovalProcessException
public void cancelRequest(java.lang.String id, java.lang.String app, java.lang.String processor) throws java.lang.IllegalArgumentException, javax.naming.NamingException, ApprovalProcessException
id
- Id of the request to be cancelled.app
- Target application for the request.processor
- Identity of the user that wants to cancel the request. For LDAP based metadata storage, this is expected to be a DN.java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException
protected Request getRequest(java.lang.String id, java.lang.String app, int flags) throws java.lang.IllegalArgumentException, javax.naming.NamingException, ApprovalProcessException
java.lang.IllegalArgumentException
javax.naming.NamingException
ApprovalProcessException
protected boolean isApprovalNeeded(RequestOperationData req) throws javax.naming.NamingException, InvalidRequestException
javax.naming.NamingException
InvalidRequestException
protected boolean checkUserAccess(java.lang.String user, Request req) throws javax.naming.NamingException, InvalidRequestException
javax.naming.NamingException
InvalidRequestException
protected boolean isValidApprover(Request req, java.lang.String approverDN) throws javax.naming.NamingException, InvalidRequestException
javax.naming.NamingException
InvalidRequestException
protected java.util.List getCreatedRequests(java.lang.String user, RequestSearchCriteria criteria, int flags) throws javax.naming.NamingException, ApprovalProcessException
javax.naming.NamingException
ApprovalProcessException
protected java.util.List getRequestsWCriteria(RequestSearchCriteria criteria, int flags) throws javax.naming.NamingException, ApprovalProcessException
javax.naming.NamingException
ApprovalProcessException
protected java.util.List getPendingRequestsToApprove(java.lang.String user, int flags) throws javax.naming.NamingException, ApprovalProcessException
javax.naming.NamingException
ApprovalProcessException
protected java.util.List getRequestsWProcStatus(java.lang.String app, java.lang.String procstatus) throws javax.naming.NamingException, ApprovalProcessException
javax.naming.NamingException
ApprovalProcessException
protected boolean isApprovalNeeded(RequestOperationData req, java.util.List policies) throws javax.naming.NamingException
javax.naming.NamingException
protected boolean isComplete(java.lang.String status)
protected Approvers getApproversForLevel(java.lang.String policyUid, int level) throws javax.naming.NamingException, java.lang.IllegalArgumentException
javax.naming.NamingException
java.lang.IllegalArgumentException
protected java.util.List getApprovers(java.lang.String policyUid) throws javax.naming.NamingException, java.lang.IllegalArgumentException
javax.naming.NamingException
java.lang.IllegalArgumentException
protected java.util.List getApprovalPolicies(java.lang.String toApp, java.lang.String operation) throws javax.naming.NamingException, java.lang.IllegalArgumentException
javax.naming.NamingException
java.lang.IllegalArgumentException
protected java.lang.String storeRequest(Request req) throws InvalidRequestException, javax.naming.NamingException, ApprovalProcessException
InvalidRequestException
javax.naming.NamingException
ApprovalProcessException
protected void changeRequestStatus(java.lang.String id, java.lang.String app, java.lang.String status, java.lang.String approver) throws InvalidRequestException, javax.naming.NamingException, ApprovalProcessException
InvalidRequestException
javax.naming.NamingException
ApprovalProcessException
protected void changeRequestProcessingStatus(java.lang.String id, java.lang.String app, java.lang.String status) throws InvalidRequestException, javax.naming.NamingException, ApprovalProcessException
InvalidRequestException
javax.naming.NamingException
ApprovalProcessException
protected void changeRequestStatuses(java.lang.String id, java.lang.String app, java.lang.String status, java.lang.String approver, java.lang.String procstatus) throws InvalidRequestException, javax.naming.NamingException, ApprovalProcessException
InvalidRequestException
javax.naming.NamingException
ApprovalProcessException
protected boolean isAdmin(java.lang.String user)
protected boolean isMatch(ApprovalPolicy pol, RequestOperationData opdata) throws javax.naming.NamingException
javax.naming.NamingException
protected java.lang.String resolveApproverRole(java.lang.String name, java.lang.String userKey, java.util.List userInfo) throws javax.naming.NamingException, ApprovalProcessException
javax.naming.NamingException
ApprovalProcessException
protected java.util.List getAllActions(java.lang.String user, Request req) throws javax.naming.NamingException, ApprovalProcessException
javax.naming.NamingException
ApprovalProcessException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |