Class ResourceReturnable
- java.lang.Object
-
- org.ametys.web.frontoffice.search.metamodel.impl.ResourceReturnable
-
- All Implemented Interfaces:
Returnable
,Configurable
,Serviceable
public class ResourceReturnable extends Object implements Returnable, Serviceable, Configurable
Returnable
forResource
s
-
-
Field Summary
Fields Modifier and Type Field Description protected I18nizableText
_label
The labelprotected ReturnableSaxer
_saxer
The saxerprotected TikaProvider
_tikaProvider
The tika providerstatic String
ROLE
Avalon Role
-
Constructor Summary
Constructors Constructor Description ResourceReturnable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Query
_filterVisibleContentAttachmentQuery(Collection<ContextQueriesWrapper> contextQueriesWrappers)
private Query
_filterVisiblePageAttachmentQuery(Collection<ContextQueriesWrapper> contextQueriesWrappers)
private Query
_queryOnContentAttachmentFromQueryOnContent(Query queryOnContent)
private Query
_queryOnContentAttachmentFromQueryOnPage(Query queryOnPage)
private Query
_queryOnPageAttachment(Query queryOnPage)
void
configure(Configuration configuration)
Query
filterReturnedDocumentQuery(Collection<ContextQueriesWrapper> contextQueriesWrappers, AdditionalParameterValueMap additionalParameterValues)
Returns the query to execute in order to filter returned objects (according to their type) during the search.Collection<FacetDefinition>
getFacets(AdditionalParameterValueMap additionalParameterValues)
Gets the facetsString
getId()
Gets the id of the extensionI18nizableText
getLabel()
Gets the label of the type of resultReturnableSaxer
getSaxer(Collection<Returnable> allReturnables, AdditionalParameterValueMap additionalParameterValues)
Returns thesaxer
responsible to SAX hits of this Returnable.Collection<SortDefinition>
getSorts(AdditionalParameterValueMap additionalParameterValues)
Gets the sortsboolean
selectedByDefault()
Returnstrue
if the type must be selected by defaultvoid
service(ServiceManager manager)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.Returnable
additionalServiceParameters, relationsWith
-
-
-
-
Field Detail
-
_tikaProvider
protected TikaProvider _tikaProvider
The tika provider
-
_label
protected I18nizableText _label
The label
-
_saxer
protected ReturnableSaxer _saxer
The saxer
-
-
Constructor Detail
-
ResourceReturnable
public ResourceReturnable()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getId
public String getId()
Description copied from interface:Returnable
Gets the id of the extension- Specified by:
getId
in interfaceReturnable
- Returns:
- the id of the extension
-
getLabel
public I18nizableText getLabel()
Description copied from interface:Returnable
Gets the label of the type of result- Specified by:
getLabel
in interfaceReturnable
- Returns:
- the label of the type of result
-
selectedByDefault
public boolean selectedByDefault()
Description copied from interface:Returnable
Returnstrue
if the type must be selected by default- Specified by:
selectedByDefault
in interfaceReturnable
- Returns:
true
if the type must be selected by default
-
filterReturnedDocumentQuery
public Query filterReturnedDocumentQuery(Collection<ContextQueriesWrapper> contextQueriesWrappers, AdditionalParameterValueMap additionalParameterValues)
Description copied from interface:Returnable
Returns the query to execute in order to filter returned objects (according to their type) during the search.
It should callContextQueriesWrapper#getQuery
in order to make aJoinQuery
on interesting parts ofContextQueriesWrapper
s and then constructs anAndQuery
composed of aDocumentTypeQuery
and the result of the call.- Specified by:
filterReturnedDocumentQuery
in interfaceReturnable
- Parameters:
contextQueriesWrappers
- The contextqueries
additionalParameterValues
- The additional parameter values- Returns:
- the query to execute in order to filter returned objects (according to their type) during the search.
-
_filterVisibleContentAttachmentQuery
private Query _filterVisibleContentAttachmentQuery(Collection<ContextQueriesWrapper> contextQueriesWrappers)
-
_queryOnContentAttachmentFromQueryOnContent
private Query _queryOnContentAttachmentFromQueryOnContent(Query queryOnContent)
-
_queryOnContentAttachmentFromQueryOnPage
private Query _queryOnContentAttachmentFromQueryOnPage(Query queryOnPage)
-
_filterVisiblePageAttachmentQuery
private Query _filterVisiblePageAttachmentQuery(Collection<ContextQueriesWrapper> contextQueriesWrappers)
-
_queryOnPageAttachment
private Query _queryOnPageAttachment(Query queryOnPage)
-
getSaxer
public ReturnableSaxer getSaxer(Collection<Returnable> allReturnables, AdditionalParameterValueMap additionalParameterValues)
Description copied from interface:Returnable
Returns thesaxer
responsible to SAX hits of this Returnable.- Specified by:
getSaxer
in interfaceReturnable
- Parameters:
allReturnables
- AllReturnable
s (including this)additionalParameterValues
- The additional parameter values- Returns:
- the
saxer
responsible to SAX hits of this Returnable.
-
getFacets
public Collection<FacetDefinition> getFacets(AdditionalParameterValueMap additionalParameterValues)
Description copied from interface:Returnable
Gets the facets- Specified by:
getFacets
in interfaceReturnable
- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the facets
-
getSorts
public Collection<SortDefinition> getSorts(AdditionalParameterValueMap additionalParameterValues)
Description copied from interface:Returnable
Gets the sorts- Specified by:
getSorts
in interfaceReturnable
- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the sorts
-
-