public class IndexingFieldSearchUICriterion extends AbstractSearchUICriterion implements IndexingFieldSearchCriterion, Contextualizable, LogEnabled, Disposable
| Modifier and Type | Field and Description |
|---|---|
protected String |
_contentTypeId
The ID of the content type which contains the metadata.
|
private Context |
_context |
protected ThreadSafeComponentManager<Enumerator> |
_enumeratorManager
ComponentManager for
Enumerators. |
protected String |
_fieldPath
The field path
|
protected String |
_fullPath
The field full path
|
protected HierarchicalReferenceTablesHelper |
_hierarchicalReferenceTablesHelper
The content search helper.
|
protected boolean |
_isMultipleOperandAnd
Is it AND or OR for multiple metadata
|
private boolean |
_isTypeContentWithMultilingualTitle |
protected List<String> |
_joinPaths
The join paths
|
private Logger |
_logger |
private ServiceManager |
_manager |
protected Query.Operator |
_operator
The criteria operator
|
protected ContentSearchHelper |
_searchHelper
The content search helper.
|
protected UserHelper |
_userHelper
The user helper
|
protected ThreadSafeComponentManager<Validator> |
_validatorManager
ComponentManager for
Validators. |
static String |
SEARCH_CRITERIA_METADATA_PREFIX
Prefix for id of metadata search criteria
|
_contentHelper, _cTypeEP, _resolver, _userManager, _userPopulationDAO| Constructor and Description |
|---|
IndexingFieldSearchUICriterion() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_configureDescription(Configuration configuration,
IndexingField indexingField,
String fieldName,
MetadataDefinition definition) |
private void |
_configureLabel(Configuration configuration,
IndexingField indexingField,
String fieldName,
MetadataDefinition definition) |
private void |
_configureOperator(Configuration configuration,
MetadataDefinition definition)
Configure the criterion operator.
|
private void |
_configureTypeContentWithMultilingualTitle(MetadataDefinition finalDefinition) |
private Query |
_getSingleDateQuery(String value,
String fieldPath,
Query.Operator operator) |
void |
configure(Configuration configuration) |
void |
contextualize(Context context) |
void |
dispose() |
protected Query |
getBooleanQuery(Object value,
String fieldPath,
Query.Operator operator)
Get a boolean query.
|
protected Query |
getContentQuery(Object value,
String language,
String fieldPath,
Query.Operator operator)
Get a content query.
|
protected Query |
getDateQuery(Object value,
String fieldPath,
Query.Operator operator)
Get a date query.
|
protected Query |
getDoubleQuery(Object value,
String fieldPath,
Query.Operator operator)
Get a double query.
|
String |
getFieldId()
Get the field identifier.
|
String |
getFieldPath()
Get the path of field (separated by '/')
|
protected String |
getFieldPath(IndexingField indexingField,
String[] remainingPathSegments)
Get the field's path without join paths
|
List<String> |
getJoinPaths()
Get the join paths, separated with slashes.
|
protected Query |
getLongQuery(Object value,
String fieldPath,
Query.Operator operator)
Get a long query.
|
protected MetadataDefinition |
getMetadataDefinition(IndexingField indexingField,
String[] remainingPathSegments,
List<String> joinPaths)
Get the metadata definition from the indexing field.
|
Query.Operator |
getOperator()
Get the operator.
|
Query |
getQuery(Object value,
Query.Operator customOperator,
Map<String,Object> allValues,
String language,
Map<String,Object> contextualParameters)
Get the
Query associated to the given value. |
SearchField |
getSearchField()
Get the
SearchField representing this search criterion. |
protected Query |
getStringQuery(Object value,
String language,
String fieldPath,
Query.Operator operator,
boolean isValueEscaped)
Get a string query.
|
protected Query |
getUserQuery(Object value,
String fieldPath,
Query.Operator operator)
Get a user query
|
private static boolean |
isEmpty(Object value) |
void |
service(ServiceManager manager) |
void |
setLogger(Logger logger)
Called at creation time to provide a
Logger. |
_configureI18nizableText, _initializeValidator, configureId, configureLabelsAndGroup, configureUIProperties, configureValues, configureWidget, configureWidgetParameters, getChangeClassName, getContentTypeId, getFacetLabel, getGroup, getInitClassName, getMetadataDefinition, getSubmitClassName, isHidden, isMultiple, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setMultiple, setSubmitClassNamegetDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParametersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId, getQuery, isFacetable, isFacetable, isSortable, isSortablegetContentTypeId, getEnumerator, getType, isMultiplegetDefaultValue, getDescription, getLabel, getValidator, getWidget, getWidgetParameterspublic static final String SEARCH_CRITERIA_METADATA_PREFIX
protected ContentSearchHelper _searchHelper
protected HierarchicalReferenceTablesHelper _hierarchicalReferenceTablesHelper
protected UserHelper _userHelper
protected Query.Operator _operator
protected String _fieldPath
protected List<String> _joinPaths
protected boolean _isMultipleOperandAnd
protected String _contentTypeId
protected ThreadSafeComponentManager<Validator> _validatorManager
Validators.protected ThreadSafeComponentManager<Enumerator> _enumeratorManager
Enumerators.private ServiceManager _manager
private boolean _isTypeContentWithMultilingualTitle
public IndexingFieldSearchUICriterion()
public void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void setLogger(Logger logger)
LogEnabledLogger.setLogger in interface LogEnabledlogger - a Logger for messages.public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class AbstractSearchUICriterionServiceExceptionpublic void dispose()
dispose in interface Disposablepublic void configure(Configuration configuration) throws ConfigurationException
configure in interface Configurableconfigure in class AbstractSearchUICriterionConfigurationExceptionpublic Query.Operator getOperator()
getOperator in interface SearchCriterionpublic String getFieldId()
SearchUICriteriongetFieldId in interface SearchUICriterionpublic String getFieldPath()
getFieldPath in interface IndexingFieldSearchCriterionpublic List<String> getJoinPaths()
getJoinPaths in interface IndexingFieldSearchCriterionpublic Query getQuery(Object value, Query.Operator customOperator, Map<String,Object> allValues, String language, Map<String,Object> contextualParameters)
SearchCriterionQuery associated to the given value.getQuery in interface SearchCriterionvalue - The user-submitted value (or the default value if not set) for this criterion.customOperator - In advanced search mode, the operator chosen by the user. null to use the criterion-defined operator (simple search mode).allValues - All the user-submitted values.language - The current search language.contextualParameters - the search contextual parameters.Query associated to the given value.protected Query getStringQuery(Object value, String language, String fieldPath, Query.Operator operator, boolean isValueEscaped)
value - The value to use for this criterion.language - The search language.fieldPath - The field path.operator - The query operator to use.isValueEscaped - true if the given value is already escapedprotected Query getBooleanQuery(Object value, String fieldPath, Query.Operator operator)
value - The value to use for this criterion.fieldPath - The field path.operator - The query operator to use.protected Query getDoubleQuery(Object value, String fieldPath, Query.Operator operator)
value - The value to use for this criterion.fieldPath - The field path.operator - The query operator to use.protected Query getLongQuery(Object value, String fieldPath, Query.Operator operator)
value - The value to use for this criterion.fieldPath - The field path.operator - The query operator to use.protected Query getDateQuery(Object value, String fieldPath, Query.Operator operator)
value - The value to use for this criterion.fieldPath - The field path.operator - The query operator to use.private Query _getSingleDateQuery(String value, String fieldPath, Query.Operator operator)
protected Query getContentQuery(Object value, String language, String fieldPath, Query.Operator operator)
value - The value to use for this criterion.language - The search language.fieldPath - The field path.operator - The query operator to use.protected Query getUserQuery(Object value, String fieldPath, Query.Operator operator)
value - The value to use for this criterion.fieldPath - The field path.operator - The query operator to use.public SearchField getSearchField()
SearchCriterionSearchField representing this search criterion.getSearchField in interface SearchCriteriongetSearchField in class AbstractSearchUICriterionSearchField representing this search criterion.private void _configureTypeContentWithMultilingualTitle(MetadataDefinition finalDefinition)
private void _configureOperator(Configuration configuration, MetadataDefinition definition) throws ConfigurationException
configuration - the global criterion configuration.definition - the metadata definition.ConfigurationException - if an error occurs.private void _configureLabel(Configuration configuration, IndexingField indexingField, String fieldName, MetadataDefinition definition)
private void _configureDescription(Configuration configuration, IndexingField indexingField, String fieldName, MetadataDefinition definition)
protected MetadataDefinition getMetadataDefinition(IndexingField indexingField, String[] remainingPathSegments, List<String> joinPaths) throws ConfigurationException
indexingField - The initial indexing fieldremainingPathSegments - The path to access the metadata or an another indexing field from the initial indexing fieldjoinPaths - The consecutive's path in case of joint to access the field/metadataConfigurationException - If an error occurs.protected String getFieldPath(IndexingField indexingField, String[] remainingPathSegments) throws ConfigurationException
indexingField - The initial indexing fieldremainingPathSegments - The path to access the metadata or an another indexing field from the initial indexing fieldConfigurationException - If an error occurs.