com.sap.netweaver.bc.uwl.substitution

Interface IProviderSubstitutionManager


public interface IProviderSubstitutionManager

This interface defines the substitution actions supported in provider systems. The IProviderSubstitutionManager interface should be implemented by respective provider system if substitution feature is to be made available in UWL.


Field Summary
static String AWF_SUBSTITUTION_MGR_ID
          AdHow Workflow Substitution Manager id
static String BWF_SUBSTITUTION_MGR_ID
          Business Workflow Substitution Manager id
static String DEFAULT_PROFILE_ALL
          Default substitution profile.
static int MODE_RECEIVETASKS
           
static int MODE_TAKEOVER
           
static int MODE_UNDEFINED
           
 
Method Summary
 void createSubstitution(UWLContext ctx, Substitution sub)
          Create the specified substitution definition for the original user.
 void endTakeOver(UWLContext ctx, AssignedSubstitution assignedSubstitution)
          This method terminates the previously taken-over substitution for the original user by this user.
 List getAllSubstitutions(UWLContext ctx, String system)
          Look up all the substitutions defined for a user of this context.
 List getAssignedSubstitutions(UWLContext ctx, String system)
          To look up if the user himself/herself has been assigned as a substitute for other colleague(s) at the time of query.
 String getId()
          Every IProviderSubstitutionManager should identify itself with a unique identifer.
 SubstitutionProfile[] getSubProfiles(UWLContext ctx, String system)
          Return a list of unique available substitution profiles available of a system from the provider.
 List getSubstitutions(UWLContext ctx, String system, String profileId)
          Look up all the substitutions defined for a user of this context, defined for a particular substitution profile.
 void removeSubstitution(UWLContext ctx, Substitution substitution)
          Delete precisely the specified substitution definition If the substitution does not exist, return silent.
 boolean supportOnOff()
          Return true if switching on/off feature is supported, otherwise false.
 void switchOffSubstitution(UWLContext ctx, Substitution substitution)
          Switch off the specified substitution definition.
 void switchOnSubstitution(UWLContext ctx, Substitution substitution)
          Switch on the specified substitution definition.
 void takeOverSubstitution(UWLContext ctx, AssignedSubstitution assignedSubstitution)
          If another user has defined a ‘Take Over’ substitution mode for this user, this user can initiate a take over.
 

Field Detail

MODE_UNDEFINED

public static final int MODE_UNDEFINED
See Also:
Constant Field Values

MODE_TAKEOVER

public static final int MODE_TAKEOVER
See Also:
Constant Field Values

MODE_RECEIVETASKS

public static final int MODE_RECEIVETASKS
See Also:
Constant Field Values

BWF_SUBSTITUTION_MGR_ID

public static final String BWF_SUBSTITUTION_MGR_ID
Business Workflow Substitution Manager id

See Also:
Constant Field Values

AWF_SUBSTITUTION_MGR_ID

public static final String AWF_SUBSTITUTION_MGR_ID
AdHow Workflow Substitution Manager id

See Also:
Constant Field Values

DEFAULT_PROFILE_ALL

public static final String DEFAULT_PROFILE_ALL
Default substitution profile.
- for system that do not support profile
- or a common denominator to be referred by all provider systems if they have their own 'All Tasks' profile (if any).

See Also:
Constant Field Values
Method Detail

getId

public String getId()
Every IProviderSubstitutionManager should identify itself with a unique identifer.

Returns:
not null identifier

supportOnOff

public boolean supportOnOff()
Return true if switching on/off feature is supported, otherwise false.


getSubProfiles

public SubstitutionProfile[] getSubProfiles(UWLContext ctx,
                                            String system)
                                     throws SubstitutionException
Return a list of unique available substitution profiles available of a system from the provider. Return NULL if the substitution profile not supported at all. That is, substitution is effective for all tasks in the provider system by default. If there is a profile in the provider system that covers all tasks, skip that OR REPLACE that profile with DEFAULT_PROFILE_ALL

Parameters:
ctx - contains locale data, not null
system - specifies the only system from which substitutions are to be retreived
Returns:
list of substition profiles. See SubProfile
Throws:
when - there exists a problem in the provider system to get substitution profiles
SubstitutionException

getAllSubstitutions

public List getAllSubstitutions(UWLContext ctx,
                                String system)
                         throws SubstitutionException
Look up all the substitutions defined for a user of this context.

Parameters:
ctx - contains user information, not null
system - specifies the only system from which substitutions are to be retreived
Returns:
A list of Substitution definition defined in Substitution. Profile id should be replaced with NULL OR DEFAULT_PROFILE_ALL if no substitution profile or the profile covers all tasks. Return null if no definition exists.
Throws:
when - there exists a problem in the provider system to get substitution definitions
SubstitutionException

getSubstitutions

public List getSubstitutions(UWLContext ctx,
                             String system,
                             String profileId)
                      throws SubstitutionException
Look up all the substitutions defined for a user of this context, defined for a particular substitution profile.

Parameters:
ctx - contains user information, not null
system - specifies the only system from which substitutions are to be retreived
profileId - Substitution profile id. Null means 'All tasks' by default.
Returns:
A list of Substitution definition defined in Substitution. Profile id should be replaced with NULL OR DEFAULT_PROFILE_ALL if the profile covers all tasks. Return null if no definition exists.
Throws:
when - there exists a problem in the provider system to get substitution definitions
SubstitutionException

createSubstitution

public void createSubstitution(UWLContext ctx,
                               Substitution sub)
                        throws SubstitutionException
Create the specified substitution definition for the original user. If the substitution already exists, exception can be thrown or silent.

Parameters:
ctx - contains user information, not null
sub - Substition definition. See Substitution. Profile id is DEFAULT_PROFILE_ALL for covering all tasks or no profile substitution.
Throws:
SubstitutionException

removeSubstitution

public void removeSubstitution(UWLContext ctx,
                               Substitution substitution)
                        throws SubstitutionException
Delete precisely the specified substitution definition If the substitution does not exist, return silent. If the substitution has been a 'fills in' type, the action of taking over by the substitute user will be dropped.

Parameters:
ctx - contains original user information, not null
substitution - contains the substitution definition. Profile id is DEFAULT_PROFILE_ALL for covering all tasks or no profile substitution.
Throws:
when - there exists a problem in the provider system to remove this substitution
SubstitutionException

switchOnSubstitution

public void switchOnSubstitution(UWLContext ctx,
                                 Substitution substitution)
                          throws SubstitutionException
Switch on the specified substitution definition. If the substitution is already on, then nothing will be changed. If no substitution defined between the original user and the substitute user, do nothing

Parameters:
ctx - contains original user information, not null
substitution - substitution to be switched on. Profile id is DEFAULT_PROFILE_ALL for covering all tasks or no profile substitution.
Throws:
when - there exists a general problem in the provider system to switch on the specified substitution
SubstitutionException

switchOffSubstitution

public void switchOffSubstitution(UWLContext ctx,
                                  Substitution substitution)
                           throws SubstitutionException
Switch off the specified substitution definition. If the substitution is already off, then nothing will be changed. If no substitution defined between the original user and the substitute user, do nothing If the substitution has been a 'fills in' type, the action of taking over by the substitute user will be dropped.

Parameters:
ctx - contains original user information, not null
substitution - substitution to be switched off. Profile id is DEFAULT_PROFILE_ALL for covering all tasks or no profile substitution.
Throws:
when - there exists a general problem in the provider system to switch off substitution
SubstitutionException

getAssignedSubstitutions

public List getAssignedSubstitutions(UWLContext ctx,
                                     String system)
                              throws SubstitutionException
To look up if the user himself/herself has been assigned as a substitute for other colleague(s) at the time of query. Note that only the current effective substitution are covered.

Parameters:
ctx - contains substitute user information, not null
system - specifies the only system from which substitutions are to be retreived
Returns:
List of current effective assigned substitution by other users. See AssignedSubstitution. Profile id should be replaced with NULL OR DEFAULT_PROFILE_ALL if no substitution profile or the profile covers all tasks. Return null if no assignment exists.
Throws:
SubstitutionException

takeOverSubstitution

public void takeOverSubstitution(UWLContext ctx,
                                 AssignedSubstitution assignedSubstitution)
                          throws SubstitutionException
If another user has defined a ‘Take Over’ substitution mode for this user, this user can initiate a take over. If the substitution is already taken over, do nothing. If the original user disables or removes this substitution, the take-over will no longer be effective.

Parameters:
ctx - contains substitute user information that is triggering the take over, not null
assignedSubstitution - contains information about the original user and profile. Profile id is DEFAULT_PROFILE_ALL for covering all tasks or no profile substitution.
Throws:
throws - exception if take over fails (eg. Not exists) in the provider system.
SubstitutionException

endTakeOver

public void endTakeOver(UWLContext ctx,
                        AssignedSubstitution assignedSubstitution)
                 throws SubstitutionException
This method terminates the previously taken-over substitution for the original user by this user. If the substitution has not been turned on, do nothing.

Parameters:
ctx - contains substitute user information that is ending the take over, not null
assignedSubstitution - contains information about the original user and profile. Profile id is DEFAULT_PROFILE_ALL for covering all tasks or no profile substitution.
Throws:
throws - exception if the termination of take over fails (eg. not exists) in the provider system.
SubstitutionException


Copyright 2006 SAP AG Complete Copyright Notice