|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.filenet.wcm.toolkit.server.util.ClientTimeZoneUtil
Field Summary | |
static java.lang.String |
BROWSER_OFFSET1_KEY
|
static java.lang.String |
BROWSER_OFFSET2_KEY
|
static java.lang.String |
BROWSER_TIME1_KEY
|
static java.lang.String |
BROWSER_TIME2_KEY
|
static java.lang.String |
CLIENT_TIME_ZONE_ID
|
protected static java.lang.String |
TZ_QUERY_FORM_NAME
|
Constructor Summary | |
ClientTimeZoneUtil()
|
Method Summary | |
static void |
configureBrowserTimeZone(javax.servlet.http.HttpServletRequest req,
java.util.Map parameters,
java.util.Locale clientLocale,
WcmDataStore dataStore)
Configures the browser TimeZone object based on information passed back from the client browser (either applet or a JavaScript form, and stores it in the datastore. |
static void |
configureClientTimeZone(javax.servlet.http.HttpServletRequest req,
java.util.Map parameters,
java.util.Locale clientLocale,
WcmDataStore dataStore)
Configures the client TimeZone object based on information passed back from the client browser, and stores it in the datastore. |
static void |
configureClientTimeZone(javax.servlet.http.HttpServletRequest req,
java.util.Map parameters,
java.util.Locale clientLocale,
WcmDataStore dataStore,
boolean forceRefresh)
Configures the client TimeZone object based on information passed back from the client browser, and stores it in the datastore. |
static java.util.TimeZone |
getBrowserTimeZone(WcmDataStore ds)
Gets the browser TimeZone from the datastore. |
static java.util.TimeZone |
getClientTimeZone(WcmDataStore ds,
java.util.TimeZone defaultTimeZone)
Gets the client TimeZone from the datastore. |
static java.util.TimeZone |
getTimeZone(java.lang.String timeZoneID)
|
static java.lang.String |
getTimeZoneHiddenFields(java.lang.String formName,
java.lang.String extraScript)
Return a set of hidden fields that can be included in an HTML form, to support retrieval of the browser machine's timezone information when needed. |
static java.lang.String |
getTimeZoneParameter(javax.servlet.http.HttpServletRequest request,
java.util.Map parameters,
java.lang.String key)
|
static boolean |
isClientTimeZoneDefined(WcmDataStore ds)
Indicates whether or not the client TimeZone object exists in the datastore. |
static boolean |
isTimeZoneExplicit(WcmDataStore ds)
Returns true if the client timezone explicit flag is set. |
static boolean |
queryBrowserTimeZone(WcmDataStore dataStore,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String windowId,
java.lang.String eventTarget,
java.lang.String eventName)
Retrieve the browser timezone by writing a hidden form to the browser and submitting it. |
static void |
setBrowserTimeZone(WcmDataStore ds,
java.util.TimeZone clientTimeZone)
Set the browser TimeZone object in the datastore. |
static void |
setClientTimeZone(WcmDataStore ds,
java.util.TimeZone clientTimeZone)
Set the client TimeZone object in the datastore. |
static void |
setClientTimeZone(WcmDataStore ds,
java.util.TimeZone clientTimeZone,
boolean isExplicit)
Set the client TimeZone object in the datastore. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String BROWSER_TIME1_KEY
public static java.lang.String BROWSER_TIME2_KEY
public static java.lang.String BROWSER_OFFSET1_KEY
public static java.lang.String BROWSER_OFFSET2_KEY
public static java.lang.String CLIENT_TIME_ZONE_ID
protected static final java.lang.String TZ_QUERY_FORM_NAME
Constructor Detail |
public ClientTimeZoneUtil()
Method Detail |
public static boolean queryBrowserTimeZone(WcmDataStore dataStore, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String windowId, java.lang.String eventTarget, java.lang.String eventName) throws java.lang.Exception
dataStore
- - The dataStore object for this session.request
- - The request object. The URL of this request object is used as the form action URL.response
- - The response object.windowId
- - The windowId to encode on the form action (optional).eventTarget
- - The target UI module name for a targeted event (optional).eventName
- - The event name for a targeted or global event (optional).
java.lang.Exception
public static java.lang.String getTimeZoneHiddenFields(java.lang.String formName, java.lang.String extraScript)
public static boolean isClientTimeZoneDefined(WcmDataStore ds)
ds
- The datastore
public static java.util.TimeZone getTimeZone(java.lang.String timeZoneID)
public static java.util.TimeZone getClientTimeZone(WcmDataStore ds, java.util.TimeZone defaultTimeZone) throws java.lang.Exception
ds
- The datastoredefaultTimeZone
- The default timezone to use if the client timezone is not defined.
java.lang.Exception
public static java.util.TimeZone getBrowserTimeZone(WcmDataStore ds) throws java.lang.Exception
ds
- The datastore
java.lang.Exception
public static boolean isTimeZoneExplicit(WcmDataStore ds)
ds
-
public static java.lang.String getTimeZoneParameter(javax.servlet.http.HttpServletRequest request, java.util.Map parameters, java.lang.String key)
public static void configureClientTimeZone(javax.servlet.http.HttpServletRequest req, java.util.Map parameters, java.util.Locale clientLocale, WcmDataStore dataStore) throws WcmException
req
- The request containing the browser timezone info key/values (optional). If set to null, parameters must be specified.parameters
- The map containing the browser timezone info key/values (optional). If set to null, req must be specified.dataStore
-
WcmException
public static void configureClientTimeZone(javax.servlet.http.HttpServletRequest req, java.util.Map parameters, java.util.Locale clientLocale, WcmDataStore dataStore, boolean forceRefresh) throws WcmException
req
- The request containing the browser timezone info key/values (optional). If set to null, parameters must be specified.parameters
- The map containing the browser timezone info key/values (optional). If set to null, req must be specified.dataStore
- forceRefresh
- Store new timezone information even if it is already set in the session.
WcmException
public static void configureBrowserTimeZone(javax.servlet.http.HttpServletRequest req, java.util.Map parameters, java.util.Locale clientLocale, WcmDataStore dataStore) throws WcmException
req
- The request containing the browser timezone info key/values (optional). If set to null, parameters must be specified.parameters
- The map containing the browser timezone info key/values (optional). If set to null, req must be specified.dataStore
-
WcmException
public static void setClientTimeZone(WcmDataStore ds, java.util.TimeZone clientTimeZone) throws WcmException
clientTimeZone
-
WcmException
public static void setBrowserTimeZone(WcmDataStore ds, java.util.TimeZone clientTimeZone) throws WcmException
clientTimeZone
-
WcmException
public static void setClientTimeZone(WcmDataStore ds, java.util.TimeZone clientTimeZone, boolean isExplicit) throws WcmException
clientTimeZone
- isExplicit
- - Sets the explicit flag for the specified timezone.
WcmException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |