Class DateParametersEditorHelper

java.lang.Object
de.hybris.platform.cockpit.model.editor.DateParametersEditorHelper

public class DateParametersEditorHelper extends Object
Helper class which determine date format and lenient flag based on parameters specified in configuration
  • Constructor Details

    • DateParametersEditorHelper

      public DateParametersEditorHelper()
  • Method Details

    • getDateFormat

      public static String getDateFormat(Map<String,? extends Object> parameters, org.zkoss.zul.Datebox dateBox)
      Determines the date format for the Datebox.

      The given date format can be either a custom date format e. g. dd/MM/yyyy (see SimpleDateFormat) or the following constants for getting a localized date format:

      • short
      • medium
      • long
      • full
      Parameters:
      parameters -
      Returns:
      date format for the Datebox or default date Format if format is invalid
    • getDefaultDateFormat

      protected static String getDefaultDateFormat(org.zkoss.zul.Datebox datebox)
    • getLenientFlag

      public static boolean getLenientFlag(Map<String,? extends Object> parameters)
      Determines the lenient flag to used for the Datebox.

      The flag can specify as parameter.

      If no parameter is specified the default value from the project.properties is used.

      Returns true if no default and no parameter is used.

      Parameters:
      parameters -
      Returns:
      the determined lenient flag
    • getLenientDefault

      public static String getLenientDefault()