Enum CmsSimpleSearchConfigurationParser.SortOption
- java.lang.Object
-
- java.lang.Enum<CmsSimpleSearchConfigurationParser.SortOption>
-
- org.opencms.jsp.search.config.parser.CmsSimpleSearchConfigurationParser.SortOption
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CmsSimpleSearchConfigurationParser.SortOption>
- Enclosing class:
- CmsSimpleSearchConfigurationParser
public static enum CmsSimpleSearchConfigurationParser.SortOption extends java.lang.Enum<CmsSimpleSearchConfigurationParser.SortOption>
Sort options that are available by default.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DATE_ASC
Sort by date ascending.DATE_DESC
Sort by date descending.ORDER_ASC
Sort by order ascending.ORDER_DESC
Sort by order descending.TITLE_ASC
Sort by title ascending.TITLE_DESC
Sort by title descending.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description I_CmsSearchConfigurationSortOption
getOption(java.util.Locale l)
Generates the suitableI_CmsSearchConfigurationSortOption
for the option.protected java.lang.String
getSortDateField(java.util.Locale l)
Returns the locale specific date field to use for sorting.protected java.lang.String
getSortOrderField(java.util.Locale l)
Returns the locale specific order field to use for sorting.protected java.lang.String
getSortTitleField(java.util.Locale l)
Returns the locale specific title field to use for sorting.static CmsSimpleSearchConfigurationParser.SortOption
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CmsSimpleSearchConfigurationParser.SortOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DATE_ASC
public static final CmsSimpleSearchConfigurationParser.SortOption DATE_ASC
Sort by date ascending.
-
DATE_DESC
public static final CmsSimpleSearchConfigurationParser.SortOption DATE_DESC
Sort by date descending.
-
TITLE_ASC
public static final CmsSimpleSearchConfigurationParser.SortOption TITLE_ASC
Sort by title ascending.
-
TITLE_DESC
public static final CmsSimpleSearchConfigurationParser.SortOption TITLE_DESC
Sort by title descending.
-
ORDER_ASC
public static final CmsSimpleSearchConfigurationParser.SortOption ORDER_ASC
Sort by order ascending.
-
ORDER_DESC
public static final CmsSimpleSearchConfigurationParser.SortOption ORDER_DESC
Sort by order descending.
-
-
Method Detail
-
values
public static CmsSimpleSearchConfigurationParser.SortOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CmsSimpleSearchConfigurationParser.SortOption c : CmsSimpleSearchConfigurationParser.SortOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CmsSimpleSearchConfigurationParser.SortOption valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getOption
public I_CmsSearchConfigurationSortOption getOption(java.util.Locale l)
Generates the suitableI_CmsSearchConfigurationSortOption
for the option.- Parameters:
l
- the locale for which the option should be created- Returns:
- the created
I_CmsSearchConfigurationSortOption
-
getSortDateField
protected java.lang.String getSortDateField(java.util.Locale l)
Returns the locale specific date field to use for sorting.- Parameters:
l
- the locale to use, can benull
- Returns:
- the locale specific date field to use for sorting.
-
getSortOrderField
protected java.lang.String getSortOrderField(java.util.Locale l)
Returns the locale specific order field to use for sorting.- Parameters:
l
- the locale to use, can benull
- Returns:
- the locale specific order field to use for sorting.
-
getSortTitleField
protected java.lang.String getSortTitleField(java.util.Locale l)
Returns the locale specific title field to use for sorting.- Parameters:
l
- the locale to use, can benull
- Returns:
- the locale specific title field to use for sorting.
-
-