public class SystemSearchUICriterion extends AbstractSearchUICriterion implements SystemSearchCriterion, Contextualizable, LogEnabled, Disposable
Modifier and Type | Field and Description |
---|---|
private Set<String> |
_contentTypes |
private Context |
_context |
protected ThreadSafeComponentManager<Enumerator> |
_enumeratorManager
ComponentManager for
Enumerator s. |
private String |
_fullPath |
protected List<String> |
_joinPaths
The join paths
|
private Logger |
_logger |
private ServiceManager |
_manager |
private Query.Operator |
_operator |
protected SystemPropertyExtensionPoint |
_systemPropEP
The system property extension point.
|
private SystemProperty |
_systemProperty |
protected ThreadSafeComponentManager<Validator> |
_validatorManager
ComponentManager for
Validator s. |
static String |
SEARCH_CRITERION_SYSTEM_PREFIX
Prefix for id of system property search criteria
|
_cTypeEP, _resolver, _userManager, _userPopulationDAO
Constructor and Description |
---|
SystemSearchUICriterion() |
Modifier and Type | Method and Description |
---|---|
private MetadataType |
_computeJoinPaths(IndexingField indexingField,
String[] remainingPathSegments,
List<String> joinPaths)
Get the indexing field type and compute the join paths.
|
private List<String> |
_configureJoinPaths(String joinPath,
String contentTypeId)
Configure the join paths.
|
private Map<String,I18nizableText> |
_configureWidgetParameters(Configuration config,
Map<String,I18nizableText> defaultParams) |
private String |
_initializeEnumerator(SystemProperty.EnumeratorDefinition enumDef) |
void |
configure(Configuration configuration) |
void |
contextualize(Context context) |
void |
dispose() |
String |
getFieldId()
Get the field identifier.
|
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. |
String |
getSystemPropertyId()
Get id of this system property
|
void |
service(ServiceManager manager) |
void |
setLogger(Logger logger)
Called at creation time to provide a
Logger . |
_configureI18nizableText, _initializeValidator, configureId, configureLabelsAndGroup, configureUIProperties, configureValues, getChangeClassName, getContentTypeId, getFacetLabel, getGroup, getInitClassName, getMetadataDefinition, getSubmitClassName, isHidden, isMultiple, setChangeClassName, setContentTypeId, setGroup, setHidden, setInitClassName, setMultiple, setSubmitClassName
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, getQuery, isFacetable, isFacetable, isSortable, isSortable
getContentTypeId, getEnumerator, getType, isMultiple
getDefaultValue, getDescription, getLabel, getValidator, getWidget, getWidgetParameters
public static final String SEARCH_CRITERION_SYSTEM_PREFIX
protected ThreadSafeComponentManager<Validator> _validatorManager
Validator
s.protected ThreadSafeComponentManager<Enumerator> _enumeratorManager
Enumerator
s.protected SystemPropertyExtensionPoint _systemPropEP
protected List<String> _joinPaths
private Query.Operator _operator
private SystemProperty _systemProperty
private Set<String> _contentTypes
private ServiceManager _manager
public SystemSearchUICriterion()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void setLogger(Logger logger)
LogEnabled
Logger
.setLogger
in interface LogEnabled
logger
- a Logger
for messages.public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractSearchUICriterion
ServiceException
public void dispose()
dispose
in interface Disposable
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
configure
in class AbstractSearchUICriterion
ConfigurationException
public Query.Operator getOperator()
getOperator
in interface SearchCriterion
public String getFieldId()
SearchUICriterion
getFieldId
in interface SearchUICriterion
public String getSystemPropertyId()
getSystemPropertyId
in interface SystemSearchCriterion
public Query getQuery(Object value, Query.Operator customOperator, Map<String,Object> allValues, String language, Map<String,Object> contextualParameters)
SearchCriterion
Query
associated to the given value.getQuery
in interface SearchCriterion
value
- 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.public SearchField getSearchField()
SearchCriterion
SearchField
representing this search criterion.getSearchField
in interface SearchCriterion
getSearchField
in class AbstractSearchUICriterion
SearchField
representing this search criterion.private Map<String,I18nizableText> _configureWidgetParameters(Configuration config, Map<String,I18nizableText> defaultParams) throws ConfigurationException
ConfigurationException
private List<String> _configureJoinPaths(String joinPath, String contentTypeId) throws ConfigurationException
joinPath
- The full join path.contentTypeId
- The base content type ID, can be null.ConfigurationException
- If the join paths are missconfiguredprivate MetadataType _computeJoinPaths(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.private String _initializeEnumerator(SystemProperty.EnumeratorDefinition enumDef)