protected I_CmsSearchConfigurationFacetField parseFieldFacet ( JSONObject fieldFacetObject ) { try { String field = fieldFacetObject . getString ( JSON_KEY_FACET_FIELD ) ; String name = parseOptionalStringValue ( fieldFacetObject , JSON_KEY_FACET_NAME ) ; String label = parseOptionalStringValue ( fieldFacetObject , JSON_KEY_FACET_LABEL ) ; Integer minCount = parseOptionalIntValue ( fieldFacetObject , JSON_KEY_FACET_MINCOUNT ) ; Integer limit = parseOptionalIntValue ( fieldFacetObject , JSON_KEY_FACET_LIMIT ) ; String prefix = parseOptionalStringValue ( fieldFacetObject , JSON_KEY_FACET_PREFIX ) ; String sorder = parseOptionalStringValue ( fieldFacetObject , JSON_KEY_FACET_ORDER ) ; I_CmsSearchConfigurationFacet . SortOrder order ; try { order = I_CmsSearchConfigurationFacet . SortOrder . valueOf ( sorder ) ; } catch ( Exception e ) { order = null ; } String filterQueryModifier = parseOptionalStringValue ( fieldFacetObject , JSON_KEY_FACET_FILTERQUERYMODIFIER ) ; Boolean isAndFacet = parseOptionalBooleanValue ( fieldFacetObject , JSON_KEY_FACET_ISANDFACET ) ; List < String > preselection = parseOptionalStringValues ( fieldFacetObject , JSON_KEY_FACET_PRESELECTION ) ; Boolean ignoreFilterAllFacetFilters = parseOptionalBooleanValue ( fieldFacetObject , JSON_KEY_FACET_IGNOREALLFACETFILTERS ) ; return new CmsSearchConfigurationFacetField ( field , name , minCount , limit , prefix , label , order , filterQueryModifier , isAndFacet , preselection , ignoreFilterAllFacetFilters ) ; } catch ( JSONException e ) { LOG . error ( Messages . get ( ) . getBundle ( ) . key ( Messages . ERR_FIELD_FACET_MANDATORY_KEY_MISSING_1 , JSON_KEY_FACET_FIELD ) , e ) ; return null ; } }
Parses the field facet configurations .