Web Dynpro API Documentation

com.sap.tc.webdynpro.services.sal.um.api
Class WDClientUser

java.lang.Object
  |
  +--com.sap.tc.webdynpro.services.sal.um.api.WDClientUser

public abstract class WDClientUser
extends java.lang.Object

WDClientUser provides static methods to access an IWDClientUser instance.

Example: An IWDClientUser can be accessed as follows:

 // Let clientUserID be an identifier of a client user
 IWDClientUser clientUser = WDClientUser.getClientUser(clientUserID);
 

See Also:
IWDClientUser

Constructor Summary
WDClientUser()
           
 
Method Summary
static boolean checkAuthentication(WDDeployableObjectPart applicationPart)
          This method checks the configuration whether authentication is required.
static IWDClientUser forceLoggedInClientUser()
          Checks whether the client user is currently logged in and returns the associated IWDClientUser object.
static IWDClientUser forceLoggedInClientUser(java.lang.Object request, java.lang.Object response)
          Deprecated. This method has been superceded by the parameterless forceLoggedInClientUser() and may be withdrawn with the first new NetWeaver release in 2006.
static void forceLogoffClientUser(java.lang.Object request, java.lang.Object response, java.lang.String url)
          Deprecated. This method has been superceded by forceLogoffClientUser(String) and may be withdrawn with the first new NetWeaver release in 2006.
static void forceLogoffClientUser(java.lang.String url)
          Logs off client user by invalidating the session and deleting the authentication cookies.
static IWDClientUser getClientUser(java.lang.String clientUserID)
          Gets the IWDClientUser with the client user ID supplied as input parameter, if existing.
static IWDClientUser[] getClientUsers()
          Return is the array of client users which currently run on the Web Dynpro runtime.
static IWDClientUser getCurrentUser()
          Gets the current IWDClientUser object, what is either an authenticated or anonymous client user.
static IWDClientUser getLoggedInClientUser()
          Checks whether the client user is currently logged in and returns his/her user id.
static IWDClientUser getLoggedInClientUser(java.lang.Object request, java.lang.Object response)
          Deprecated. This method has been superceded by the parameterless getLoggedInClientUser() and may be withdrawn with the first new NetWeaver release in 2006.
static boolean isAuthenticationRequired(WDDeployableObjectPart applicationPart)
          Return is true if the authentication flag is set for the application specified as input parameter.
static void releaseClientUser(IWDClientUser clientUser)
          Deprecated. the method is no longer supported and may be withdrawn with the first new NetWeaver release in 2006.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WDClientUser

public WDClientUser()
Method Detail

getClientUser

public static IWDClientUser getClientUser(java.lang.String clientUserID)
Gets the IWDClientUser with the client user ID supplied as input parameter, if existing. If not existing, an anonymous client user is returned with an arbitrary clientUserID. No user login is forced by this method call.
Parameters:
clientUserID - the unique ID of the client user; if null or not existing yet, an anonymous client user is created. Note that this ID is a Web Dynpro used identifier for an already created client user and does not match with the user id of the user management system.
Returns:
the created client user object

getCurrentUser

public static IWDClientUser getCurrentUser()
                                    throws WDUMException
Gets the current IWDClientUser object, what is either an authenticated or anonymous client user.
Returns:
the current client user object
Throws:
WDUMException - if there is no user (neither authenticated nor anonymous user) for the current request

forceLoggedInClientUser

public static IWDClientUser forceLoggedInClientUser(java.lang.Object request,
                                                    java.lang.Object response)
Deprecated. This method has been superceded by the parameterless forceLoggedInClientUser() and may be withdrawn with the first new NetWeaver release in 2006.

Checks whether the client user is currently logged in and returns the associated IWDClientUser object. If the user is not yet logged in, a respective logon page is written as response and null is returned.

Note: This method has been superceded by forceLoggedInClientUser(). Using this old method results in a call to forceLoggedInClientUser(), the additional parameters request and response are ignored.

Note: Delayed logon is currently not supported by Web Dynpro. User authentication should be enabled via the application authentication flag that can be set in the SAP NetWeaver Developer Studio.

Parameters:
request - the request object (ignored)
response - the response object (ignored)
Returns:
the currently logged in client user or null otherwise

forceLoggedInClientUser

public static IWDClientUser forceLoggedInClientUser()
Checks whether the client user is currently logged in and returns the associated IWDClientUser object. If the user is not yet logged in, a respective logon page is written as response and null is returned.
Note: Delayed logon is currently not supported by Web Dynpro. User authentication should be enabled via the application authentication flag that can be set in the SAP NetWeaver IDE.
Returns:
the currently logged in client user or null otherwise

getLoggedInClientUser

public static IWDClientUser getLoggedInClientUser(java.lang.Object request,
                                                  java.lang.Object response)
Deprecated. This method has been superceded by the parameterless getLoggedInClientUser() and may be withdrawn with the first new NetWeaver release in 2006.

Checks whether the client user is currently logged in and returns his/her user id. If no client user is currently logged in, null is returned. Note: This method has been superceded by getLoggedInClientUser(). Using this old method results in a call to getLoggedInClientUser(), the additional parameters request and response are ignored.

Parameters:
request - the request object (ignored)
response - the response object (ignored)
Returns:
the currently logged in client user or null otherwise

getLoggedInClientUser

public static IWDClientUser getLoggedInClientUser()
Checks whether the client user is currently logged in and returns his/her user id. If no client user is currently logged in, null is returned.
Returns:
the currently logged in client user or null otherwise

forceLogoffClientUser

public static void forceLogoffClientUser(java.lang.Object request,
                                         java.lang.Object response,
                                         java.lang.String url)
Deprecated. This method has been superceded by forceLogoffClientUser(String) and may be withdrawn with the first new NetWeaver release in 2006.

Logs off client user by invalidating the session and deleting the authentication cookies. The user will also be sent to a logoff page which acknowledges that a logoff has taken place with a link for the user to logon again.

Note: This method has been superceded by forceLogoffClientUser(String). Using this old method results in a call to forceLogoffClientUser(url), the additional parameters request and response are ignored.

Parameters:
request - the request object (ignored)
response - the response object (ignored)
url - the URL of the page that is shown to the user of logoff was done

forceLogoffClientUser

public static void forceLogoffClientUser(java.lang.String url)
Logs off client user by invalidating the session and deleting the authentication cookies. The user will also be sent to a logoff page which acknowledges that a logoff has taken place with a link for the user to logon again.

A call of forceLogoffClientUser does the following concrete steps:

  1. Logout message is sent to User Management Engine (UME). The UME deletes the authentication cookie and deletes the current HTTP session.
  2. Web Dynpro exits the current application instance.
  3. Web Dynpro redirects to the specified URL. If the specified URL is null, the redirect is done to the "LogoffURL" URL that can be specified in the application properties. If this URL is also not defined, a redirect to a Web Dynpro internal logoff page is done.
Parameters:
url - the URL of the page that is shown to the user after logoff was done. If the parameter is null, the redirect is done to the "LogoffURL" URL that can be specified in the application properties. If this URL is also not defined, a redirect to a Web Dynpro internal logoff page is done.

releaseClientUser

public static void releaseClientUser(IWDClientUser clientUser)
Deprecated. the method is no longer supported and may be withdrawn with the first new NetWeaver release in 2006.

Releases the client user instance. This does not include a logoff of the current client user, but just a removal from the IWDClientUser instance associated to the user.
Parameters:
clientUser - the client user to release

getClientUsers

public static IWDClientUser[] getClientUsers()
Return is the array of client users which currently run on the Web Dynpro runtime.
Returns:
the array of currently registered client users

checkAuthentication

public static boolean checkAuthentication(WDDeployableObjectPart applicationPart)
This method checks the configuration whether authentication is required. If so, the forceLoggedInClientUser method is called. The method returns true if authentication was successful, i.e. either the user was correctly authenticated or no authentication is required in the current session. Otherwise, false is returned. In this latter case, the application should abort execution of the program flow since authentication is required but there is no authenticated user yet.
Contract of this method: the Web Dynpro user management is based on SAP UME 4.0 or any compliant version.
Note: Web Dynpro 6.40 does not support "delayed logon" yet. This means that after user authentication is done, the application is currently restarted. Delayer logon will be supported in a later version of Web Dynpro.
Parameters:
applicationPart - the application part containing the configuration of the application
Returns:
true if authentication was successful, and false otherwise
Throws:
WDIllegalArgumentException - if applicationPart is null or applicationPart.getType() != WDDeployableObjectPartType.APPLICATION

isAuthenticationRequired

public static boolean isAuthenticationRequired(WDDeployableObjectPart applicationPart)
Return is true if the authentication flag is set for the application specified as input parameter.
Parameters:
applicationPart - a deployable object part that specifies an application
Returns:
true if authentication is required (i.e. authentication flag is set), otherwise false)
Throws:
WDIllegalArgumentException - if applicationPart is null or applicationPart.getType() != WDDeployableObjectPartType.APPLICATION

Web Dynpro API Documentation

Copyright © 2004 SAP AG. Automatically generated Thu Mar 3 2005, 22:15