com.sybase.afx.ulj
Class ProfileManager

java.lang.Object
  extended by com.sybase.afx.ulj.ProfileManager

public final class ProfileManager
extends java.lang.Object


Method Summary
 void deleteProfile(Profile profile)
          Deletes given profile from DB
static ProfileManager getInstance()
          Gets the singleton instance of
 Profile getLastActiveProfile()
          Gets the last active profile.
 Profile getProfile(java.lang.String profileName)
          Gets the Profile by profile name.
 Profile getProfile(UUID profileId)
          Gets the Profile by profile id.
 Profile[] getProfiles()
          Gets all saved Profile objects.
 void saveProfile(Profile profile)
          Saves or updates the specified Profile.
 void setLastActiveProfile(Profile profile)
          Sets the given profile as active.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ProfileManager getInstance()
Gets the singleton instance of

Returns:
ProfileManager instance ProfileManager.

deleteProfile

public void deleteProfile(Profile profile)
Deletes given profile from DB

Parameters:
profile -

getProfile

public Profile getProfile(java.lang.String profileName)
Gets the Profile by profile name.

Parameters:
profileName - The profile name to find.
Returns:
Returns the specified Profile or a null reference if not found.

getProfile

public Profile getProfile(UUID profileId)
Gets the Profile by profile id.

Parameters:
profileId - The profile id to find.
Returns:
Returns the specified Profile or a null reference if not found.

getProfiles

public Profile[] getProfiles()
Gets all saved Profile objects.

Returns:
Profile array

getLastActiveProfile

public Profile getLastActiveProfile()
Gets the last active profile.

Returns:

setLastActiveProfile

public void setLastActiveProfile(Profile profile)
Sets the given profile as active.

Parameters:
profile -

saveProfile

public void saveProfile(Profile profile)
Saves or updates the specified Profile.

Parameters:
profile - The Profile to save or update.