com.sap.ip.me.api.user
Class UserManager

java.lang.Object
  extended bycom.sap.ip.me.api.user.UserManager

public abstract class UserManager
extends java.lang.Object

Manages all user relevant data and handles login / logout.

Author:
SAP

Constructor Summary
UserManager()
           
 
Method Summary
abstract  User getCurrentLogonUser()
          Gets the current user who is logged on to the MI.
abstract  User getCurrentUser()
          Gets the current user working on the Mobile Infrastructure device.
static UserManager getInstance()
          Gets the singleton instance of a UserManager.
abstract  void logOnUser(java.lang.String userName, java.lang.String password)
          Logs on a user to the Mobile Engine.
abstract  void logOutCurrentUser()
          Logs out the current user.
static void setInstance(UserManager um)
          Sets the singleton instance of a UserManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManager

public UserManager()
Method Detail

setInstance

public static void setInstance(UserManager um)
Sets the singleton instance of a UserManager. If the instance was already set a RuntimeException will be thrown.

Parameters:
um - The new instance value

getInstance

public static UserManager getInstance()
Gets the singleton instance of a UserManager.

Returns:
The singleton instance of a UserManager.

getCurrentUser

public abstract User getCurrentUser()
Gets the current user working on the Mobile Infrastructure device.

Returns:
The current user working on the Mobile Infrastructure device.

getCurrentLogonUser

public abstract User getCurrentLogonUser()
Gets the current user who is logged on to the MI.

Returns:
The current user that is logged on to the MI.
Since:
MI 2.5 (IIb)

logOnUser

public abstract void logOnUser(java.lang.String userName,
                               java.lang.String password)
                        throws LogonException
Logs on a user to the Mobile Engine. If there is another user logged on the user will be logged out and the new user gets the current user (only if password and username match).

Parameters:
userName - The username of the new user.
password - The password for the given user.
Throws:
LogonException - Will be thrown if user name is invalid, password is invalid, password does not match to the user, user is unknown

logOutCurrentUser

public abstract void logOutCurrentUser()
Logs out the current user. Stops all running aplications and removes the user configuration.



Copyright © 2005 SAP AG. All Rights Reserved.