Dekoh platform API

com.pramati.bfly.das.profile.helper
Class ProfileHelper

java.lang.Object
  extended by com.pramati.bfly.das.profile.helper.ProfileHelper

public class ProfileHelper
extends Object

Helper for getting Profile Information for a DesktopUser.

Since:
1 Aug, 2007

Field Summary
static File profileUserDataDir
           
 
Constructor Summary
ProfileHelper()
           
 
Method Summary
static File getDefaultImage(ImageSize size)
          Gets the default icons for given ImageSize
static File getLocalUserImage(String userName, ImageSize size)
          Gets the Image file of the localUser for given ImageSize.
static ProfileManager getProfileManagerForUser(DesktopUser desktopUser)
          Gets the ProfileManager of given desktopUser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

profileUserDataDir

public static File profileUserDataDir
Constructor Detail

ProfileHelper

public ProfileHelper()
Method Detail

getProfileManagerForUser

public static ProfileManager getProfileManagerForUser(DesktopUser desktopUser)
Gets the ProfileManager of given desktopUser. Instance of DesktopUser who is currently logged in can be obtained by invoking SessionUtil.getLoggedInDesktopUser(request) method.

Parameters:
desktopUser - DekohUser for whom the addressBook is needed. Cannot be null. This needs to be a valid DekohUser, i.e should be a registered DekohUser with a valid dekohId.
Returns:
ProfileManager instance for getting/updating this desktopUser profile information.

getDefaultImage

public static File getDefaultImage(ImageSize size)
Gets the default icons for given ImageSize

Parameters:
size - ImageSize
Returns:
File object to the default Image of given size. will return null, if directory holding default icons is deleted in this dekoh desktop.

getLocalUserImage

public static File getLocalUserImage(String userName,
                                     ImageSize size)
Gets the Image file of the localUser for given ImageSize.

Parameters:
userName - local Dekoh User for which ImageIcon is requested
size - ImageSize
Returns:
File object to the local users Image of given size. will return null, if given userName has never logged into this dekoh desktop, or image cache directory for this localUser is deleted.

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers