Dekoh platform API

com.pramati.bfly.das.api
Class DesktopUser

java.lang.Object
  extended by com.pramati.bfly.das.api.DesktopUser
All Implemented Interfaces:
Comparable

public final class DesktopUser
extends Object
implements Comparable

DesktopUser encapsulates a logged in User information. Instance of DesktopUser is created by Dekoh after user logs in with valid credentials. Thus created instance of this class can be retrieved using SessionUtil.getLoggedInUser(HttpServletRequest).

Since:
Feb 12, 2007

Method Summary
 int compareTo(Object o)
          
 boolean equals(Object o)
          Two compare whether two desktop users are same.
 String get(String key)
           
 String getAccountId()
          To get the AccountId of the DesktopUser.
 String getDasCookie()
           
 String getUsername()
          Username with which user has logged into this Dekoh Desktop.
 int hashCode()
          
 boolean isRegistered()
          To check whether the DesktopUser has a valid dekohid and registered with Dekoh.As,only Registered users can Log into Dekoh Desktop, this is a reduntant value to check on any Dekoh Desktop.
 void put(String key, String value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAccountId

public String getAccountId()
To get the AccountId of the DesktopUser.

Returns:
AccountId

isRegistered

public boolean isRegistered()
To check whether the DesktopUser has a valid dekohid and registered with Dekoh.As,only Registered users can Log into Dekoh Desktop, this is a reduntant value to check on any Dekoh Desktop.

Returns:
true, if DesktopUser is registered with Dekoh and has a valid dekohId. else would return false.

getUsername

public String getUsername()
Username with which user has logged into this Dekoh Desktop. As only registered user with a valid Dekoh User Id log in on Dekoh Desktop, this will represent the dekohId of the logged in user.

Returns:
username with which this dekohUser is logged into Dekoh Desktop.

getDasCookie

public String getDasCookie()

put

public void put(String key,
                String value)

get

public String get(String key)

equals

public boolean equals(Object o)
Two compare whether two desktop users are same. Two DesktopUser's are same if following three fields match


hashCode

public int hashCode()

Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)

Specified by:
compareTo in interface Comparable

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers