protected I_CmsSearchConfigurationSortOption parseSortOption ( JSONObject json ) { try { String solrValue = json . getString ( JSON_KEY_SORTOPTION_SOLRVALUE ) ; String paramValue = parseOptionalStringValue ( json , JSON_KEY_SORTOPTION_PARAMVALUE ) ; paramValue = ( paramValue == null ) ? solrValue : paramValue ; String label = parseOptionalStringValue ( json , JSON_KEY_SORTOPTION_LABEL ) ; label = ( label == null ) ? paramValue : label ; return new CmsSearchConfigurationSortOption ( label , paramValue , solrValue ) ; } catch ( JSONException e ) { LOG . error ( Messages . get ( ) . getBundle ( ) . key ( Messages . ERR_SORT_OPTION_NOT_PARSABLE_1 , JSON_KEY_SORTOPTION_SOLRVALUE ) , e ) ; return null ; } }
Returns a single sort option configuration as configured via the methods parameter or null if the parameter does not specify a sort option .