Package de.cxp.ocs.config
Interface FieldConfigAccess
-
- All Known Implementing Classes:
FieldConfigIndex
public interface FieldConfigAccessA interface that is implemented by OCS, to give quick and easy access to the configured fields.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Field>getField(String fieldName)Get field by unique field name.Map<String,Field>getFieldsByType(FieldType type)get all fields that have the specified field type configured.Map<String,Field>getFieldsByUsage(FieldUsage usage)Get all fields that have the specified usage configured.Optional<Field>getMatchingField(String fieldName, FieldUsage usage)Get field with that name and the specified usage.Set<Field>getMatchingFields(String name)Get all fields that have the the specified name as field-name or source-field.Set<Field>getMatchingFields(String fieldName, Object value)Similar togetMatchingField(String)but additionally tries to generate a field configuration based on the dynamic fields.Optional<Field>getPrimaryCategoryField()Get field configuration that should be used for the "Categories" property of the documents.
-
-
-
Method Detail
-
getField
Optional<Field> getField(String fieldName)
Get field by unique field name.- Parameters:
fieldName-- Returns:
-
getPrimaryCategoryField
Optional<Field> getPrimaryCategoryField()
Get field configuration that should be used for the "Categories" property of the documents.- Returns:
-
getFieldsByUsage
Map<String,Field> getFieldsByUsage(FieldUsage usage)
Get all fields that have the specified usage configured.- Parameters:
usage-- Returns:
-
getFieldsByType
Map<String,Field> getFieldsByType(FieldType type)
get all fields that have the specified field type configured.- Parameters:
type-- Returns:
-
getMatchingField
Optional<Field> getMatchingField(String fieldName, FieldUsage usage)
Get field with that name and the specified usage. If this does not exist, a empty result will be returned.- Parameters:
fieldName-usage-- Returns:
-
getMatchingFields
Set<Field> getMatchingFields(String name)
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-- Returns:
-
getMatchingFields
Set<Field> getMatchingFields(String fieldName, Object value)
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-value-- Returns:
-
-