com.filenet.wcm.apps.server.util
Class DateControlUtil

java.lang.Object
  extended bycom.filenet.wcm.apps.server.util.DateControlUtil

public class DateControlUtil
extends java.lang.Object

Contains static methods used to facilitate showing the Date Control


Nested Class Summary
static class DateControlUtil.DateInfo
          Deprecated. Replaced by com.filenet.wcm.apps.server.presentation.util.DateTimeControlSettings
 
Constructor Summary
DateControlUtil()
           
 
Method Summary
static int getDateFormat(com.filenet.wcm.toolkit.server.base.WcmController controller)
          get the date format from common preferences
static DateControlUtil.DateInfo getDateInfo(com.filenet.wcm.toolkit.server.base.WcmController controller)
          Deprecated. Use getDateTimeControlSettings
static com.filenet.wcm.apps.server.presentation.util.DateTimeControlSettings getDateTimeControlSettings(com.filenet.wcm.toolkit.server.base.WcmController controller)
          Gets an instance of DateTimeControlSettings representing the date/time settings based on the current Workplace configuration.
static com.filenet.wcm.apps.server.presentation.util.DateTimeControlSettings getDateTimeControlSettings(com.filenet.wcm.toolkit.server.base.WcmController controller, java.util.Locale locale)
          Gets an instance of DateTimeControlSettings representing the date/time settings based on the current Workplace configuration.
static java.util.Locale getLocale(com.filenet.wcm.toolkit.server.base.WcmController controller)
          Checks site preferences and returns the server default or client locale
static int getTimeFormat(com.filenet.wcm.toolkit.server.base.WcmController controller)
          get the time format from common preferences
static java.util.TimeZone getTimeZone(com.filenet.wcm.toolkit.server.base.WcmController controller)
          Checks site preferences and returns the server default or client locale
static void setXSLParameters(com.filenet.wcm.toolkit.server.base.WcmController controller, com.filenet.wcm.toolkit.server.ui.WcmXSLModule module, java.lang.String[] parameterNames)
          Sets XSL parameters required for date/time display or calendar control.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateControlUtil

public DateControlUtil()
Method Detail

getTimeZone

public static java.util.TimeZone getTimeZone(com.filenet.wcm.toolkit.server.base.WcmController controller)
                                      throws java.lang.Exception
Checks site preferences and returns the server default or client locale

Parameters:
controller -
Returns:
Client or default locale
Throws:
java.lang.Exception

getLocale

public static java.util.Locale getLocale(com.filenet.wcm.toolkit.server.base.WcmController controller)
                                  throws java.lang.Exception
Checks site preferences and returns the server default or client locale

Parameters:
controller -
Returns:
Client or default locale
Throws:
java.lang.Exception

getDateFormat

public static int getDateFormat(com.filenet.wcm.toolkit.server.base.WcmController controller)
                         throws java.lang.Exception
get the date format from common preferences

Parameters:
controller -
Returns:
Date Format
Throws:
java.lang.Exception

getTimeFormat

public static int getTimeFormat(com.filenet.wcm.toolkit.server.base.WcmController controller)
                         throws java.lang.Exception
get the time format from common preferences

Parameters:
controller -
Returns:
Time Format
Throws:
java.lang.Exception

setXSLParameters

public static void setXSLParameters(com.filenet.wcm.toolkit.server.base.WcmController controller,
                                    com.filenet.wcm.toolkit.server.ui.WcmXSLModule module,
                                    java.lang.String[] parameterNames)
                             throws java.lang.Exception
Sets XSL parameters required for date/time display or calendar control. The XSL parameter names are "locale", "timeZone", "dateFormat", "timeFormat".

Parameters:
controller -
module -
parameterNames - An array of four parameter names for locale, timeZone, dateFormat and timeFormat (in this order). If present, it will override the defaults.
Throws:
java.lang.Exception

getDateInfo

public static DateControlUtil.DateInfo getDateInfo(com.filenet.wcm.toolkit.server.base.WcmController controller)
                                            throws java.lang.Exception
Deprecated. Use getDateTimeControlSettings

Throws:
java.lang.Exception

getDateTimeControlSettings

public static com.filenet.wcm.apps.server.presentation.util.DateTimeControlSettings getDateTimeControlSettings(com.filenet.wcm.toolkit.server.base.WcmController controller)
                                                                                                        throws java.lang.Exception
Gets an instance of DateTimeControlSettings representing the date/time settings based on the current Workplace configuration.

Parameters:
controller -
Returns:
Throws:
java.lang.Exception

getDateTimeControlSettings

public static com.filenet.wcm.apps.server.presentation.util.DateTimeControlSettings getDateTimeControlSettings(com.filenet.wcm.toolkit.server.base.WcmController controller,
                                                                                                               java.util.Locale locale)
                                                                                                        throws java.lang.Exception
Gets an instance of DateTimeControlSettings representing the date/time settings based on the current Workplace configuration.

Parameters:
controller -
Returns:
Throws:
java.lang.Exception


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.