com.filenet.wcm.apps.server.util

Class DateControlUtil

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

  1. public class DateControlUtil
  2. extends java.lang.Object
Contains static methods used to facilitate showing the Date Control

Nested Class Summary

Modifier and Type Class and Description
  1. static class
DateControlUtil.DateInfo
Deprecated. Replaced by com.filenet.wcm.apps.server.presentation.util.DateTimeControlSettings

Constructor Summary

Constructor and Description
DateControlUtil()

Method Summary

Modifier and Type Method and Description
  1. static
  2. int
getDateFormat(com.filenet.wcm.toolkit.server.base.WcmController controller)
get the date format from common preferences
  1. static
  2. DateControlUtil.DateInfo
getDateInfo(com.filenet.wcm.toolkit.server.base.WcmController controller)
Deprecated. Use getDateTimeControlSettings
  1. static
  2. 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.
  1. static
  2. 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.
  1. static
  2. java.util.Locale
getLocale(com.filenet.wcm.toolkit.server.base.WcmController controller)
Checks site preferences and returns the server default or client locale
  1. static
  2. int
getTimeFormat(com.filenet.wcm.toolkit.server.base.WcmController controller)
get the time format from common preferences
  1. static
  2. java.util.TimeZone
getTimeZone(com.filenet.wcm.toolkit.server.base.WcmController controller)
Checks site preferences and returns the server default or client locale
  1. static
  2. 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

  1. public DateControlUtil()

Method Detail

getTimeZone

  1. public static java.util.TimeZone getTimeZone( com.filenet.wcm.toolkit.server.base.WcmController controller)
  2. 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

  1. public static java.util.Locale getLocale( com.filenet.wcm.toolkit.server.base.WcmController controller)
  2. 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

  1. public static int getDateFormat( com.filenet.wcm.toolkit.server.base.WcmController controller)
  2. throws java.lang.Exception
get the date format from common preferences
Parameters:
controller -
Returns:
Date Format
Throws:
java.lang.Exception

getTimeFormat

  1. public static int getTimeFormat( com.filenet.wcm.toolkit.server.base.WcmController controller)
  2. throws java.lang.Exception
get the time format from common preferences
Parameters:
controller -
Returns:
Time Format
Throws:
java.lang.Exception

setXSLParameters

  1. public static void setXSLParameters( com.filenet.wcm.toolkit.server.base.WcmController controller,
  2. com.filenet.wcm.toolkit.server.ui.WcmXSLModule module,
  3. java.lang.String[] parameterNames)
  4. 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

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

getDateTimeControlSettings

  1. public static com.filenet.wcm.apps.server.presentation.util.DateTimeControlSettings getDateTimeControlSettings( com.filenet.wcm.toolkit.server.base.WcmController controller)
  2. 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

  1. public static com.filenet.wcm.apps.server.presentation.util.DateTimeControlSettings getDateTimeControlSettings( com.filenet.wcm.toolkit.server.base.WcmController controller,
  2. java.util.Locale locale)
  3. 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