com.sap.netweaver.bc.uwl

Interface IUWLSubstitutionManager


public interface IUWLSubstitutionManager

IUWLSubstitutionManager provides functionality to retrieve & update the substitution information from and to the provider systems. Called by the ui presentation level. Most logic is handled in this manager, including look up of providers, their corresponding systems and to finetune the result format before returning them to the ui.

Substitution configuration data from providers is not cached but retrieved upon request for up-to-date info.

A handle to IUWLSubstitutionManager is got by calling IUWLService.getSubstitutionManager() method.


Field Summary
static String DEFAULT_PROFILE_ALL
          Default substitution profile.
static int MODE_RECEIVETASKS
           
static int MODE_TAKEOVER
           
static int MODE_UNDEFINED
           
static String UWL_SESSION_ID
           
 
Method Summary
 SubstitutionResult createSubstitution(UWLContext ctx, Substitution substitution)
          Create a single substitution definition for the original user.
 SubstitutionResult endTakeOver(UWLContext ctx, AssignedSubstitution assignedSubstitution)
          This method terminates the previously taken-over substitution for the original user by this user.
 List getAllAssignedSubstitutionResults(UWLContext ctx)
          To look up if the user himself/herself has been assigned as a substitute for other colleague(s) at the time of query.
 List getAllSubstitutionResults(UWLContext ctx)
          Look up all the substitution results defined for a user, combined for all systems.
 List getAllSubstitutions(UWLContext ctx)
          Look up all the substitutions defined for a user.
 List getAssignedSubstitutions(UWLContext ctx)
          To look up if the user himself/herself has been assigned as a substitute for other colleague(s) at the time of query.
 SubstitutionProfile getSubProfile(UWLContext ctx, String profileId)
          Return detailed substitution profile data.
 SubstitutionProfile[] getSubProfiles(UWLContext ctx)
          Return a list of CURRENTLY available substitution profiles from all provider systems.
 List getSubstitutions(UWLContext ctx, String profileId)
          Look up all the substitutions defined for a user defined for a particular substitution profile.
 Boolean hasExistingSubstitutionDefined(UWLContext ctx)
          Return True if the user has currently existing substitution defined for other users, False otherwise.
 SubstitutionStatus reconnect(UWLContext ctx, Substitution substitution)
          Reconnect to a specific system and try to detect existence/create the substitution definition as defined
 SubstitutionResult removeSubstitution(UWLContext ctx, Substitution substitution)
          Delete a single substitution definition for the original user.
 boolean supportOnOff()
          if AWF is registered, always return TRUE, otherwise, return FALSE.
 SubstitutionResult switchOffSubstitution(UWLContext ctx, Substitution substitution)
          Switch off the substitution definition.
 SubstitutionResult switchOnSubstitution(UWLContext ctx, Substitution substitution)
          Switch on a specific substitution definition..
 SubstitutionResult 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

static final int MODE_UNDEFINED
See Also:
Constant Field Values

MODE_TAKEOVER

static final int MODE_TAKEOVER
See Also:
Constant Field Values

MODE_RECEIVETASKS

static final int MODE_RECEIVETASKS
See Also:
Constant Field Values

UWL_SESSION_ID

static final String UWL_SESSION_ID
See Also:
Constant Field Values

DEFAULT_PROFILE_ALL

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

See Also:
Constant Field Values
Method Detail

getSubProfiles

SubstitutionProfile[] getSubProfiles(UWLContext ctx)
Return a list of CURRENTLY available substitution profiles from all provider systems. Return at least 1 predefined default "All Tasks" profile.

Parameters:
ctx - contains locale data, not null
Returns:
List of Substition profiles. See SubProfile

getSubProfile

SubstitutionProfile getSubProfile(UWLContext ctx,
                                  String profileId)
Return detailed substitution profile data. Return null if nothing found.

Parameters:
ctx - contains locale data, not null
Id - of the substitution profile defined in the provider system.
Returns:
Substition profile. See SubProfile

supportOnOff

boolean supportOnOff()
if AWF is registered, always return TRUE, otherwise, return FALSE.


hasExistingSubstitutionDefined

Boolean hasExistingSubstitutionDefined(UWLContext ctx)
Return True if the user has currently existing substitution defined for other users, False otherwise. Null if not known.

Parameters:
ctx - contains user information, not null

getAllSubstitutions

List getAllSubstitutions(UWLContext ctx)
Look up all the substitutions defined for a user.

Parameters:
ctx - contains user information, not null
Returns:
A list of Substitution definition defined in Substitution. Substitution with no profile id or covering all tasks should have the profile id initialized correctly with DEFAULT_PROFILE_ALL already. All other profile ids are unique. Return null if no definition exists.

getAllSubstitutionResults

List getAllSubstitutionResults(UWLContext ctx)
Look up all the substitution results defined for a user, combined for all systems.

Parameters:
ctx - contains user information, not null
Returns:
A list of Substitution definition defined in Substitution. Return null if no definition exists.

getSubstitutions

List getSubstitutions(UWLContext ctx,
                      String profileId)
Look up all the substitutions defined for a user defined for a particular substitution profile.

Parameters:
ctx - contains user information, not null
subProfile - Substitution profile. 'All tasks' must have the default DEFAULT_PROFILE_ALL
Returns:
A list of Substitution definition defined in Substitution. Return null if no definition exists.

createSubstitution

SubstitutionResult createSubstitution(UWLContext ctx,
                                      Substitution substitution)
                                      throws SubstitutionException
Create a single substitution definition for the original user.

Parameters:
ctx - contains user information, not null
substitution - Substition definition. See Substitution. 'All tasks' must have the default DEFAULT_PROFILE_ALL
Throws:
SubstitutionException

removeSubstitution

SubstitutionResult removeSubstitution(UWLContext ctx,
                                      Substitution substitution)
                                      throws SubstitutionException
Delete a single substitution definition for the original user. If the substitution does not exist, return silent.

Parameters:
ctx - contains user information, not null
substitution - contain substitution definition 'All tasks' must have the default DEFAULT_PROFILE_ALL
Throws:
when - there exists a problem in the provider system to remove this substitution
SubstitutionException

switchOnSubstitution

SubstitutionResult switchOnSubstitution(UWLContext ctx,
                                        Substitution substitution)
                                        throws SubstitutionException
Switch on a specific substitution definition.. If the substitution for the users is already on, then nothing will be changed. If no substitution defined between the original user and the substitute user, do nothing (TBD)

Parameters:
ctx - contains user information, not null
substitution - contain substitution definition to be switched on 'All tasks' must have the default DEFAULT_PROFILE_ALL
Throws:
when - there exists a general problem in the provider system to switch on substitution
SubstitutionException

switchOffSubstitution

SubstitutionResult switchOffSubstitution(UWLContext ctx,
                                         Substitution substitution)
                                         throws SubstitutionException
Switch off the 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 (TBD)

Parameters:
ctx - contains original user information, not null
substitution - substitution to be switched off. 'All tasks' must have the default DEFAULT_PROFILE_ALL
Throws:
when - there exists a general problem in the provider system to switch off substitution
SubstitutionException

getAssignedSubstitutions

List getAssignedSubstitutions(UWLContext ctx)
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
Returns:
List of current effective assigned substitution by other users. See AssignedSubstitution. Assigned substitution with no profile id or covering all tasks should have the profile id initialized correctly with DEFAULT_PROFILE_ALL already. All other profile ids are unique. Null if no definition exists.

getAllAssignedSubstitutionResults

List getAllAssignedSubstitutionResults(UWLContext ctx)
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. Create aggregated results for all systems

Parameters:
ctx - contains substitute user information, not null
Returns:
List of current effective assigned substitution by other users. See AssignedSubstitution. Null if no definition exists.

takeOverSubstitution

SubstitutionResult 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 (TBD).

Parameters:
ctx - contains substitute user information that is triggering the take over, not null
assignedSubstitution - contains information about the original user and profile 'All tasks' must have the default DEFAULT_PROFILE_ALL
Throws:
throws - exception if take over fails (eg. Not exists) in the provider system.
SubstitutionException

endTakeOver

SubstitutionResult 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 'All tasks' must have the default DEFAULT_PROFILE_ALL
assignedSubstitution - contains information about the original user and profile
Throws:
SubstitutionException

reconnect

SubstitutionStatus reconnect(UWLContext ctx,
                             Substitution substitution)
Reconnect to a specific system and try to detect existence/create the substitution definition as defined

Parameters:
ctx - contains original user information, not null
substitution - substitution rule to be created again, WITH specific system id initialized
Returns:
Substitution status is good if the substitution definition already exists or successfully created. Otherwise, not successful with corresponding message


Copyright 2009 SAP AG Complete Copyright Notice