public class ResourceSearchable extends AbstractLogEnabled implements Searchable, Serviceable, PluginAware, Contextualizable, Initializable, Disposable, Configurable
Searchable
for Resource
sModifier and Type | Field and Description |
---|---|
protected static String |
__CRITERION_DEFINITIONS_PREFIX_ID
The prefix for the ids of criterion definitions
|
private Returnable |
_contentReturnable |
private Context |
_context |
protected int |
_criteriaPosition
The criteria position
|
private DublinCoreMetadataProvider |
_dcProvider |
private ThreadSafeComponentManager<Enumerator> |
_enumeratorManager |
protected I18nizableText |
_label
The label
|
private ServiceManager |
_manager |
private Returnable |
_pageReturnable |
private String |
_pluginName |
private Returnable |
_resourceReturnable |
private LanguageEnumerator |
_sitemapEnumerator |
Constructor and Description |
---|
ResourceSearchable() |
Modifier and Type | Method and Description |
---|---|
private boolean |
_isSubQueryNonEmpty(Query queryOnCriterion) |
private Query |
_queryOnContent(Query queryOnVisibleContentAttachments) |
private Query |
_queryOnPage(Query queryOnVisiblePageAttachments) |
private Query |
_queryOnPageThroughContents(Query queryOnVisibleContentAttachments) |
void |
configure(Configuration configuration) |
void |
contextualize(Context context) |
int |
criteriaPosition()
The position of the criteria provided by this
Searchable among criteria provided by other Searchable s. |
void |
dispose() |
Collection<SearchCriterionDefinition> |
getCriteria(AdditionalParameterValueMap additionalParameterValues)
Gets the criteria
|
I18nizableText |
getLabel()
Gets the label of the searchable
|
void |
initialize() |
Optional<Query> |
joinQuery(Query queryOnCriterion,
Collection<Returnable> returnables,
AdditionalParameterValueMap additionalParameters)
Returns the query which joins the given one (on a criterion) with the given result types
|
Collection<Returnable> |
relationsWith()
Retrieves the relations the type must have with some
Returnable s. |
void |
service(ServiceManager manager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
getLogger, setLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
additionalServiceParameters
protected static final String __CRITERION_DEFINITIONS_PREFIX_ID
protected I18nizableText _label
protected int _criteriaPosition
private ServiceManager _manager
private Returnable _resourceReturnable
private Returnable _pageReturnable
private Returnable _contentReturnable
private String _pluginName
private DublinCoreMetadataProvider _dcProvider
private ThreadSafeComponentManager<Enumerator> _enumeratorManager
private LanguageEnumerator _sitemapEnumerator
public ResourceSearchable()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void dispose()
dispose
in interface Disposable
public I18nizableText getLabel()
Searchable
getLabel
in interface Searchable
public Collection<SearchCriterionDefinition> getCriteria(AdditionalParameterValueMap additionalParameterValues)
Searchable
getCriteria
in interface Searchable
additionalParameterValues
- The additional parameter valuespublic int criteriaPosition()
Searchable
Searchable
among criteria provided by other Searchable
s.
Searchable
are always packed together, this integer just affects the relative position compared to other Searchable
criteria.
criteriaPosition
in interface Searchable
Searchable
public Optional<Query> joinQuery(Query queryOnCriterion, Collection<Returnable> returnables, AdditionalParameterValueMap additionalParameters)
Searchable
joinQuery
in interface Searchable
queryOnCriterion
- The query on the criterion to join fromreturnables
- The returnables to join toadditionalParameters
- The additional parametersprivate boolean _isSubQueryNonEmpty(Query queryOnCriterion)
private Query _queryOnContent(Query queryOnVisibleContentAttachments)
private Query _queryOnPage(Query queryOnVisiblePageAttachments)
private Query _queryOnPageThroughContents(Query queryOnVisibleContentAttachments)
public Collection<Returnable> relationsWith()
Searchable
Returnable
s.
Returnable.relationsWith()
declares the relation, it is useless to declare it twice)relationsWith
in interface Searchable
Returnable
s