protected I_CmsSearchConfigurationFacetField parseFieldFacet ( final String pathPrefix ) { try { final String field = parseMandatoryStringValue ( pathPrefix + XML_ELEMENT_FACET_FIELD ) ; final String name = parseOptionalStringValue ( pathPrefix + XML_ELEMENT_FACET_NAME ) ; final String label = parseOptionalStringValue ( pathPrefix + XML_ELEMENT_FACET_LABEL ) ; final Integer minCount = parseOptionalIntValue ( pathPrefix + XML_ELEMENT_FACET_MINCOUNT ) ; final Integer limit = parseOptionalIntValue ( pathPrefix + XML_ELEMENT_FACET_LIMIT ) ; final String prefix = parseOptionalStringValue ( pathPrefix + XML_ELEMENT_FACET_PREFIX ) ; final String sorder = parseOptionalStringValue ( pathPrefix + XML_ELEMENT_FACET_ORDER ) ; I_CmsSearchConfigurationFacet . SortOrder order ; try { order = I_CmsSearchConfigurationFacet . SortOrder . valueOf ( sorder ) ; } catch ( @ SuppressWarnings ( "unused" ) final Exception e ) { order = null ; } final String filterQueryModifier = parseOptionalStringValue ( pathPrefix + XML_ELEMENT_FACET_FILTERQUERYMODIFIER ) ; final Boolean isAndFacet = parseOptionalBooleanValue ( pathPrefix + XML_ELEMENT_FACET_ISANDFACET ) ; final List < String > preselection = parseOptionalStringValues ( pathPrefix + XML_ELEMENT_FACET_PRESELECTION ) ; final Boolean ignoreAllFacetFilters = parseOptionalBooleanValue ( pathPrefix + XML_ELEMENT_FACET_IGNOREALLFACETFILTERS ) ; return new CmsSearchConfigurationFacetField ( field , name , minCount , limit , prefix , label , order , filterQueryModifier , isAndFacet , preselection , ignoreAllFacetFilters ) ; } catch ( final Exception e ) { LOG . error ( Messages . get ( ) . getBundle ( ) . key ( Messages . ERR_FIELD_FACET_MANDATORY_KEY_MISSING_1 , XML_ELEMENT_FACET_FIELD ) , e ) ; return null ; } }
Reads the configuration of a field facet .