@Override
    protected List<I_CmsSearchConfigurationSortOption> getSortOptions() {

        if (m_configObject.has(JSON_KEY_SORTOPTIONS)) {
            return super.getSortOptions();
        } else {
            List<I_CmsSearchConfigurationSortOption> options = new LinkedList<I_CmsSearchConfigurationSortOption>();

            CmsSimpleSearchConfigurationParser.SortOption currentOption = CmsSimpleSearchConfigurationParser.SortOption.valueOf(
                m_config.getSortOrder());
            if (m_sortOrder != null) {
                currentOption = m_sortOrder;
            }
            Locale locale = getSearchLocale();
            options.add(currentOption.getOption(locale));
            CmsSimpleSearchConfigurationParser.SortOption[] sortOptions = CmsSimpleSearchConfigurationParser.SortOption.values();
            for (int i = 0; i < sortOptions.length; i++) {
                CmsSimpleSearchConfigurationParser.SortOption option = sortOptions[i];
                if (!Objects.equals(currentOption, option)) {
                    options.add(option.getOption(locale));
                }
            }
            return options;
        }
    }
@ Override protected List < I_CmsSearchConfigurationSortOption > getSortOptions ( ) { if ( m_configObject . has ( JSON_KEY_SORTOPTIONS ) ) { return super . getSortOptions ( ) ; } else { List < I_CmsSearchConfigurationSortOption > options = new LinkedList < I_CmsSearchConfigurationSortOption > ( ) ; CmsSimpleSearchConfigurationParser . SortOption currentOption = CmsSimpleSearchConfigurationParser . SortOption . valueOf ( m_config . getSortOrder ( ) ) ; if ( m_sortOrder != null ) { currentOption = m_sortOrder ; } Locale locale = getSearchLocale ( ) ; options . add ( currentOption . getOption ( locale ) ) ; CmsSimpleSearchConfigurationParser . SortOption [ ] sortOptions = CmsSimpleSearchConfigurationParser . SortOption . values ( ) ; for ( int i = 0 ; i < sortOptions . length ; i ++ ) { CmsSimpleSearchConfigurationParser . SortOption option = sortOptions [ i ] ; if ( ! Objects . equals ( currentOption , option ) ) { options . add ( option . getOption ( locale ) ) ; } } return options ; } }
@see org.opencms.jsp.search.config.parser.CmsJSONSearchConfigurationParser#getSortOptions()