private I_CmsSearchConfigurationSortOption parseSortOption(final String pathPrefix) {

        try {
            final String solrValue = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_SORTOPTION_SOLRVALUE);
            String paramValue = parseOptionalStringValue(pathPrefix + XML_ELEMENT_SORTOPTION_PARAMVALUE);
            paramValue = (paramValue == null) ? solrValue : paramValue;
            String label = parseOptionalStringValue(pathPrefix + XML_ELEMENT_SORTOPTION_LABEL);
            label = (label == null) ? paramValue : label;
            return new CmsSearchConfigurationSortOption(label, paramValue, solrValue);
        } catch (final Exception e) {
            LOG.error(
                Messages.get().getBundle().key(
                    Messages.ERR_SORT_OPTION_NOT_PARSABLE_1,
                    XML_ELEMENT_SORTOPTION_SOLRVALUE),
                e);
            return null;
        }
    }
private I_CmsSearchConfigurationSortOption parseSortOption ( final String pathPrefix ) { try { final String solrValue = parseMandatoryStringValue ( pathPrefix + XML_ELEMENT_SORTOPTION_SOLRVALUE ) ; String paramValue = parseOptionalStringValue ( pathPrefix + XML_ELEMENT_SORTOPTION_PARAMVALUE ) ; paramValue = ( paramValue == null ) ? solrValue : paramValue ; String label = parseOptionalStringValue ( pathPrefix + XML_ELEMENT_SORTOPTION_LABEL ) ; label = ( label == null ) ? paramValue : label ; return new CmsSearchConfigurationSortOption ( label , paramValue , solrValue ) ; } catch ( final Exception e ) { LOG . error ( Messages . get ( ) . getBundle ( ) . key ( Messages . ERR_SORT_OPTION_NOT_PARSABLE_1 , XML_ELEMENT_SORTOPTION_SOLRVALUE ) , e ) ; return null ; } }
Returns the configuration of a single sort option, or <code>null</code> if the XML cannot be read.
@param pathPrefix The XML path to the root node of the sort option's configuration.
@return The configuration of a single sort option, or <code>null</code> if the XML cannot be read.