com.plumtree.uiinfrastructure.statichelpers
Class PersonalSettingsHelper

java.lang.Object
  extended by com.plumtree.uiinfrastructure.statichelpers.PersonalSettingsHelper

public class PersonalSettingsHelper
extends java.lang.Object

Helper to get and set key values on the HTTPSession sandbox. Please refer to AActivitySpace to see usage. Includes things originally in LoginHelper; intent is to support core personal settings applicable to any product: access style, locale, language.

Author:
DavidP

Field Summary
static java.lang.String ACCESS_STYLE
          key session setting names used by defaults
static java.lang.String BASE_URL
           
static java.lang.String LANGUAGE
           
static java.lang.String LOCALE
           
static java.lang.String PREFS_SUBSESSION_NAME
          name of the personal settings sub-session.
static java.lang.String TIMEZONE
           
 
Constructor Summary
PersonalSettingsHelper()
           
 
Method Summary
static boolean DoesPrefsSubSessionExist(AActivitySpace activitySpace)
          Call this method to determine if the subsession for caching personal settings exists in the specified ISessionManager.
static boolean DoesPrefsSubSessionExist(ISessionManager sessionManager)
          Use this version of DoesPrefsSubSessionExist if all you have is the session manager.
static java.lang.Object FindPersonalSetting(java.lang.Object[][] oaSettings, java.lang.String sName)
          Call this method to find the value associated with given setting name.
static java.lang.Object GetPersonalSettingValue(java.lang.String sSettingName, AActivitySpace activitySpace)
          Call this method to obtain the value of a personal setting.
static java.lang.Object GetPersonalSettingValue(java.lang.String sSettingName, ISessionManager sessionManager, IApplication application)
          Only use this version if all you have is the subsession
static void RemovePersonalSetting(java.lang.String sSettingName, ISessionManager sessionManager)
          Call this method to remove a personal setting name on the session (infrastructure HttpSession sandbox)

static void SetPersonalSettingValue(java.lang.String sSettingName, java.lang.Object oSettingVal, AActivitySpace activitySpace)
          Call this method to set a personal setting name value pair on the session (infrastructure HttpSession sandbox)

static void SetPersonalSettingValue(java.lang.String sSettingName, java.lang.Object oSettingVal, ISessionManager sessionManager)
          Call this method to set a personal setting name value pair on the session (infrastructure HttpSession sandbox)

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCESS_STYLE

public static final java.lang.String ACCESS_STYLE
key session setting names used by defaults

See Also:
Constant Field Values

LOCALE

public static final java.lang.String LOCALE
See Also:
Constant Field Values

LANGUAGE

public static final java.lang.String LANGUAGE
See Also:
Constant Field Values

TIMEZONE

public static final java.lang.String TIMEZONE
See Also:
Constant Field Values

BASE_URL

public static final java.lang.String BASE_URL
See Also:
Constant Field Values

PREFS_SUBSESSION_NAME

public static final java.lang.String PREFS_SUBSESSION_NAME
name of the personal settings sub-session. This should only be used by the interpreter.

See Also:
Constant Field Values
Constructor Detail

PersonalSettingsHelper

public PersonalSettingsHelper()
Method Detail

DoesPrefsSubSessionExist

public static boolean DoesPrefsSubSessionExist(AActivitySpace activitySpace)
Call this method to determine if the subsession for caching personal settings exists in the specified ISessionManager.

Parameters:
AActivitySpace -

DoesPrefsSubSessionExist

public static boolean DoesPrefsSubSessionExist(ISessionManager sessionManager)
Use this version of DoesPrefsSubSessionExist if all you have is the session manager.

Parameters:
ISessionManager -

FindPersonalSetting

public static java.lang.Object FindPersonalSetting(java.lang.Object[][] oaSettings,
                                                   java.lang.String sName)
Call this method to find the value associated with given setting name.

Parameters:
oaSettings - Pass an Object[][] obtained from LookupPersonalSettings
String - name of setting

GetPersonalSettingValue

public static java.lang.Object GetPersonalSettingValue(java.lang.String sSettingName,
                                                       ISessionManager sessionManager,
                                                       IApplication application)
Only use this version if all you have is the subsession

Parameters:
sSettingName - String name of personal setting
sessionManager - ISessionManager
Throws:
XPException - This method will throw an XPException if you do not pass an ISessionManager already containing the correct subSession. The ISessionManager obtained from your Activity Space will contain the correct subsession.

GetPersonalSettingValue

public static java.lang.Object GetPersonalSettingValue(java.lang.String sSettingName,
                                                       AActivitySpace activitySpace)
Call this method to obtain the value of a personal setting.

This value will be retrieved from the user's web session if possible, otherwise the portal server will be queried.

Parameters:
sSettingName - String name of personal setting
AActivitySpace - as
Throws:
XPException - This method will throw an XPException if you do not pass an ISessionManager already containing the correct subSession. The ISessionManager obtained from your Activity Space will contain the correct subsession.

SetPersonalSettingValue

public static void SetPersonalSettingValue(java.lang.String sSettingName,
                                           java.lang.Object oSettingVal,
                                           AActivitySpace activitySpace)
Call this method to set a personal setting name value pair on the session (infrastructure HttpSession sandbox)

Parameters:
sSettingName - String name of personal setting
oSettingVal - Object value of personal setting
as - AActivitySpace Pass an AActivitySpace implementing IXPActivitySpace.
Throws:
XPException - This method may throw an XPException.

SetPersonalSettingValue

public static void SetPersonalSettingValue(java.lang.String sSettingName,
                                           java.lang.Object oSettingVal,
                                           ISessionManager sessionManager)
Call this method to set a personal setting name value pair on the session (infrastructure HttpSession sandbox)

Parameters:
sSettingName - String name of personal setting
oSettingVal - Object value of personal setting
sessionManager - ISessionManager Pass the correct subsession (AS. GetSubSession)
Throws:
XPException - This method may throw an XPException.

RemovePersonalSetting

public static void RemovePersonalSetting(java.lang.String sSettingName,
                                         ISessionManager sessionManager)
Call this method to remove a personal setting name on the session (infrastructure HttpSession sandbox)

Parameters:
sSettingName - String name of personal setting
sessionManager - ISessionManager Pass the correct subsession (AS. GetSubSession)
Throws:
XPException - This method may throw an XPException.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.