Class DateParametersEditorHelper
java.lang.Object
de.hybris.platform.cockpit.model.editor.DateParametersEditorHelper
Helper class which determine date format and lenient flag based on parameters specified in configuration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetDateFormat(Map<String, ? extends Object> parameters, org.zkoss.zul.Datebox dateBox) Determines the date format for theDatebox.protected static StringgetDefaultDateFormat(org.zkoss.zul.Datebox datebox) static Stringstatic booleangetLenientFlag(Map<String, ? extends Object> parameters) Determines the lenient flag to used for the Datebox.
-
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 theDatebox.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
Dateboxor default date Format if format is invalid
-
getDefaultDateFormat
-
getLenientFlag
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
trueif no default and no parameter is used.- Parameters:
parameters-- Returns:
- the determined lenient flag
-
getLenientDefault
-