|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.portaluiinfrastructure.login.PTPersonalSettingsHelper
public class PTPersonalSettingsHelper
This class handles getting and setting personal settings using the plumtree session info object.
Field Summary | |
---|---|
static java.lang.String |
ACCESS_STYLE_COOKIE_NAME
Access Style Cookie name |
static java.lang.String |
LOCALE_USE_BROWSER_SETTING
Use Browser Setting ID (Locale) |
static java.lang.String |
LOCALE_USE_DEFAULT_SETTING
Use Default Setting ID (Locale) |
Constructor Summary | |
---|---|
PTPersonalSettingsHelper()
|
Method Summary | |
---|---|
static void |
CachePersonalSettings(AActivitySpace aSpace,
IApplication application,
XPResourceManager rm,
ApplicationData appData)
Call this method to cache all personal settings on the session. |
static void |
CachePersonalSettings(ISessionManager sessionManager,
IApplication application,
IPTSession ptSession,
XPResourceManager rm,
ApplicationData appData)
Caches all settings to the IPTSession as well as the HTTPSession. |
static boolean |
DoesPrefsSubSessionExist(AActivitySpace asSpace)
Call this method to determine if the subsession for caching personal settings exists in the specified ISessionManager. |
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.String |
GetDefaultLocale(IApplication application)
This helper method determines the fall back default locale, assuming that the locale could not be determined by the browser settings. |
static XPDateFormat |
GetPersonalDateTimeFormat(AActivitySpace _asSpace,
boolean _localizedToUsersTimeZone)
This method returns an XPDateFormat in the user's current locale and timezone. |
static XPLocale |
GetPersonalSettingValue_Locale(AActivitySpace _asSpace)
This method returns an XPLocale object created from the current user's locale. |
static XPTimeZone |
GetPersonalSettingValue_TimeZone(AActivitySpace _asSpace)
This method returns an XPTimeZone object created from the current user's time zone. |
static java.lang.Object |
GetPersonalSettingValue(java.lang.String sSettingName,
AActivitySpace asSpace)
Call this method to obtain the value of a personal setting. |
static java.lang.Object |
GetPersonalSettingValue(java.lang.String sSettingName,
ISessionManager sessionManager,
IApplication application,
IPTSession ptSession)
Only use this version of this function if you do not have an AActivitySpace. |
static IPTSession |
GetPTSession(AActivitySpace asSpace)
Method GetPTSession. |
static XPArrayList |
GetSettingsToCache(IApplication app)
Retrieve the individual settings to cache in the lower-level HTTPSession as opposed to the higher-level IPTSessionInfo. |
static boolean |
IsLocaleSupported(java.lang.String strLocale,
XPResourceManager rm)
This method determines whether or not the supplied locale matches one of the languages that this server can actually display. |
static void |
RemovePersonalSetting(java.lang.String sSettingName,
AActivitySpace asSpace)
Call this method to find the remove the specified setting from the DB |
static void |
SetAndCachePersonalSetting(java.lang.String sSettingName,
java.lang.Object oSettingVal,
AActivitySpace asSpace)
Call this method to set a personal setting name value pair on the portal server, and update the session cache of personal settings. |
static void |
SetAndCachePersonalSetting(java.lang.String sSettingName,
java.lang.Object oSettingVal,
IPTSession ptSession,
ISessionManager sessionManager,
IApplication app,
XPResourceManager rm)
This method stores a personal setting on the HTTP Session and in the DB. |
static void |
SetPersonalSetting(java.lang.String sSettingName,
java.lang.Object oSettingVal,
IPTSession ptSession,
ISessionManager sessionManager,
IApplication app,
XPResourceManager rm)
This method stores a personal setting on the HTTP Session, but not in the DB. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ACCESS_STYLE_COOKIE_NAME
public static final java.lang.String LOCALE_USE_BROWSER_SETTING
public static final java.lang.String LOCALE_USE_DEFAULT_SETTING
Constructor Detail |
---|
public PTPersonalSettingsHelper()
Method Detail |
---|
public static void CachePersonalSettings(AActivitySpace aSpace, IApplication application, XPResourceManager rm, ApplicationData appData)
AActivitySpace
- IApplication
- XPResourceManager
- public static void CachePersonalSettings(ISessionManager sessionManager, IApplication application, IPTSession ptSession, XPResourceManager rm, ApplicationData appData)
ISessionManager
- IApplication
- IPTSession
- XPResourceManager
- public static boolean DoesPrefsSubSessionExist(AActivitySpace asSpace)
ISessionManager
- public static java.lang.Object FindPersonalSetting(java.lang.Object[][] oaSettings, java.lang.String sName)
oaSettings
- Pass an Object[][] obtained from LookupPersonalSettingsString
- name of settingpublic static void RemovePersonalSetting(java.lang.String sSettingName, AActivitySpace asSpace)
oaSettings
- Pass an Object[][] obtained from LookupPersonalSettingsString
- name of settingpublic static java.lang.Object GetPersonalSettingValue(java.lang.String sSettingName, AActivitySpace asSpace)
sSettingName
- String name of personal settingas
- AActivitySpace
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.public static java.lang.Object GetPersonalSettingValue(java.lang.String sSettingName, ISessionManager sessionManager, IApplication application, IPTSession ptSession)
sSettingName
- String name of personal settingsessionManager
- ISessionManagerptSession
- IPTSession
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.public static XPLocale GetPersonalSettingValue_Locale(AActivitySpace _asSpace)
_asSpace
- The current Activity Space.
public static XPTimeZone GetPersonalSettingValue_TimeZone(AActivitySpace _asSpace)
_asSpace
- The current Activity Space.
public static XPDateFormat GetPersonalDateTimeFormat(AActivitySpace _asSpace, boolean _localizedToUsersTimeZone)
public static XPArrayList GetSettingsToCache(IApplication app)
app
- Application object
public static void SetAndCachePersonalSetting(java.lang.String sSettingName, java.lang.Object oSettingVal, AActivitySpace asSpace)
sSettingName
- String name of personal settingoSettingVal
- Object value of personal settingas
- AActivitySpace Pass an AActivitySpace implementing
IXPActivitySpace.
XPException
- This method may throw an XPException.public static void SetPersonalSetting(java.lang.String sSettingName, java.lang.Object oSettingVal, IPTSession ptSession, ISessionManager sessionManager, IApplication app, XPResourceManager rm)
sSettingName
- String name of personal settingoSettingVal
- Object value of personal settingas
- AActivitySpace Pass an AActivitySpace implementing
IXPActivitySpace.
XPException
- This method may throw an XPException.public static void SetAndCachePersonalSetting(java.lang.String sSettingName, java.lang.Object oSettingVal, IPTSession ptSession, ISessionManager sessionManager, IApplication app, XPResourceManager rm)
sSettingName
- String name of personal settingoSettingVal
- Object value of personal settingas
- AActivitySpace Pass an AActivitySpace implementing
IXPActivitySpace.
XPException
- This method may throw an XPException.public static IPTSession GetPTSession(AActivitySpace asSpace)
as
-
public static java.lang.String GetDefaultLocale(IApplication application)
application
-
public static boolean IsLocaleSupported(java.lang.String strLocale, XPResourceManager rm)
strLocale
- rm
-
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |