com.bea.wli.worklist.api
Interface WorkSubstituteManager


public interface WorkSubstituteManager

This class manages work substitute rules.

Since:
8.1

Method Summary
 String[] addWorkSubstituteRules(WorkSubstituteRule[] workSubstituteRules)
          Add the substitution rules to the database.
 WorkSubstituteRule[] getAllWorkSubstituteRules()
          Get all work substitution rules currently in the database.
 String getWorkSubstitute(String user, Date date)
          Get the substitute (target) for the given user (source) for the given date.
 WorkSubstituteRule getWorkSubstituteRule(String ruleId)
          Get a work substitution rule.
 WorkSubstituteRule[] getWorkSubstituteRulesWithSource(String source)
          Get all work substitution rules for the given source.
 WorkSubstituteRule[] getWorkSubstituteRulesWithTarget(String target)
          Get all work substitution rules for the given target.
 void removeWorkSubstituteRules(String[] workSubstituteRuleIds)
          Remove all the substitution rules from the database.
 void updateWorkSubstituteRules(WorkSubstituteRule[] rules)
          Update work substitution rules.
 

Method Detail

addWorkSubstituteRules

String[] addWorkSubstituteRules(WorkSubstituteRule[] workSubstituteRules)
                                throws ManagementException,
                                       RemoteException
Add the substitution rules to the database. If rule id is provided it will be used else a new one will be generated.

Parameters:
workSubstituteRules - containing rules to be added
Returns:
array of unique rule ids
Throws:
ManagementException - if the operation failed
RemoteException - if the communication failed

removeWorkSubstituteRules

void removeWorkSubstituteRules(String[] workSubstituteRuleIds)
                               throws ManagementException,
                                      RemoteException
Remove all the substitution rules from the database. If an exception occurs while removing any rule the whole transaction will be rolled back and no rules will be removed.

Parameters:
workSubstituteRuleIds - containing rule ids to be deleted
Throws:
ManagementException - if the operation failed
RemoteException - if the communication failed

getWorkSubstituteRule

WorkSubstituteRule getWorkSubstituteRule(String ruleId)
                                         throws ManagementException,
                                                RemoteException
Get a work substitution rule.

Parameters:
ruleId -
Returns:
the work substitution rule
Throws:
ManagementException - if the operation failed
RemoteException - if the communication failed

updateWorkSubstituteRules

void updateWorkSubstituteRules(WorkSubstituteRule[] rules)
                               throws ManagementException,
                                      RemoteException
Update work substitution rules.

Parameters:
rules -
Throws:
ManagementException - if the operation failed
RemoteException - if the communication failed

getAllWorkSubstituteRules

WorkSubstituteRule[] getAllWorkSubstituteRules()
                                               throws ManagementException,
                                                      RemoteException
Get all work substitution rules currently in the database.

Returns:
array of work substitution rules
Throws:
ManagementException - if the operation failed
RemoteException - if the communication failed

getWorkSubstituteRulesWithSource

WorkSubstituteRule[] getWorkSubstituteRulesWithSource(String source)
                                                      throws ManagementException,
                                                             RemoteException
Get all work substitution rules for the given source.

Parameters:
source - (user or group)
Returns:
array of qualifying work substitution rules
Throws:
ManagementException - if the operation failed
RemoteException - if the communication failed

getWorkSubstituteRulesWithTarget

WorkSubstituteRule[] getWorkSubstituteRulesWithTarget(String target)
                                                      throws ManagementException,
                                                             RemoteException
Get all work substitution rules for the given target.

Parameters:
target - (user or group)
Returns:
array of qualifying work substitution rules
Throws:
ManagementException - if the operation failed
RemoteException - if the communication failed

getWorkSubstitute

String getWorkSubstitute(String user,
                         Date date)
                         throws ManagementException,
                                RemoteException
Get the substitute (target) for the given user (source) for the given date.

Parameters:
user - containing the source user or group name
Returns:
the qualifying target
Throws:
ManagementException - if the operation failed
RemoteException - if the communication failed