Class DateParametersEditorHelper
- java.lang.Object
-
- de.hybris.platform.cockpit.model.editor.DateParametersEditorHelper
-
public class DateParametersEditorHelper extends java.lang.ObjectHelper class which determine date format and lenient flag based on parameters specified in configuration
-
-
Constructor Summary
Constructors Constructor Description DateParametersEditorHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetDateFormat(java.util.Map<java.lang.String,? extends java.lang.Object> parameters, org.zkoss.zul.Datebox dateBox)Determines the date format for theDatebox.protected static java.lang.StringgetDefaultDateFormat(org.zkoss.zul.Datebox datebox)static java.lang.StringgetLenientDefault()static booleangetLenientFlag(java.util.Map<java.lang.String,? extends java.lang.Object> parameters)Determines the lenient flag to used for the Datebox.
-
-
-
Method Detail
-
getDateFormat
public static java.lang.String getDateFormat(java.util.Map<java.lang.String,? extends java.lang.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
protected static java.lang.String getDefaultDateFormat(org.zkoss.zul.Datebox datebox)
-
getLenientFlag
public static boolean getLenientFlag(java.util.Map<java.lang.String,? extends java.lang.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
trueif no default and no parameter is used.- Parameters:
parameters-- Returns:
- the determined lenient flag
-
getLenientDefault
public static java.lang.String getLenientDefault()
-
-