Package de.cxp.ocs.config
Interface FieldConfigAccess
- All Known Implementing Classes:
FieldConfigIndex
public interface FieldConfigAccess
A interface that is implemented by OCS, to give quick and easy access to the
configured fields.
-
Method Summary
Modifier and TypeMethodDescriptionGet field by unique field name.getFieldsByType
(FieldType type) get all fields that have the specified field type configured.getFieldsByUsage
(FieldUsage usage) Get all fields that have the specified usage configured.getMatchingField
(String fieldName, FieldUsage usage) Get field with that name and the specified usage.getMatchingFields
(String name) Get all fields that have the the specified name as field-name or source-field.getMatchingFields
(String fieldName, Object value) Similar togetMatchingField(String)
but additionally tries to generate a field configuration based on the dynamic fields.Get field configuration that should be used for the "Categories" property of the documents.
-
Method Details
-
getField
Get field by unique field name.- Parameters:
fieldName
- unique field name- Returns:
- optional matching field
-
getPrimaryCategoryField
Get field configuration that should be used for the "Categories" property of the documents.- Returns:
- optional matching field
-
getFieldsByUsage
Get all fields that have the specified usage configured.- Parameters:
usage
- filter criterion- Returns:
- matching fields
-
getFieldsByType
get all fields that have the specified field type configured.- Parameters:
type
- filter criterion- Returns:
- matching fields
-
getMatchingField
Get field with that name and the specified usage. If this does not exist, a empty result will be returned.- Parameters:
fieldName
- could match any source-field nameusage
- filter criterion- Returns:
- optional matching field
-
getMatchingFields
Get all fields that have the the specified name as field-name or source-field. If source-fields are not given at initialization (such at the search service), this function works similar togetField(String)
- Parameters:
name
- could match any source-field name- Returns:
- matching fields
-
getMatchingFields
Similar togetMatchingField(String)
but additionally tries to generate a field configuration based on the dynamic fields. If no dynamic fields are configured (such as at the search-service), no field configs are generated.- Parameters:
fieldName
- could match any source-fieldvalue
- filter criterion- Returns:
- matching fields
-