Class PrivateContentReturnable
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdder
-
- org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdderReturnable
-
- org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedReturnable
-
- org.ametys.web.frontoffice.search.metamodel.impl.PrivateContentReturnable
-
- All Implemented Interfaces:
LogEnabled
,PluginAware
,Returnable
,Initializable
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
UserReturnable
public class PrivateContentReturnable extends AbstractContentBasedReturnable
This class is a generic returnable to be used to search on aprivate
ContentType
.
You must associate it with aSearchable
which is or extendsPrivateContentSearchable
<extension point="org.ametys.web.frontoffice.search.metamodel.ReturnableExtensionPoint" id="my.returnable.id" class="org.ametys.web.frontoffice.search.metamodel.impl.PrivateContentReturnable"> <label i18n="true">...</label> <associatedSearchable>my.searchable.id</associatedSearchable> </extension>
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_associatedContentSearchableRole
The associated content searchable roleprotected String
_avalonRole
The Avalon role of this Returnableprotected String
_definitionPrefix
Theprefix
for facet and sort definitionsprotected String
_shortAvalonRole
The "short version" of the Avalon role of this Returnable-
Fields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedReturnable
_associatedContentSearchable, _contentFilterHelper, _contentHelper, _context, _label, _searchableEP
-
Fields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdder
_manager, _pluginName
-
-
Constructor Summary
Constructors Constructor Description PrivateContentReturnable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_configureAssociatedContentReturnableRole(Configuration configuration)
Initializes_associatedContentSearchableRole
field from configurationprotected PrivateContentSearchable
_getAssociatedSearchable()
Gets the associatedPrivateContentSearchable
protected void
_initAvalonRole(Configuration configuration)
Initializes_avalonRole
field from configurationprotected void
_initDefinitionPrefix()
Initializes_definitionPrefix
fieldprotected void
_initShortAvalonRole()
Initializes_shortAvalonRole
fieldprotected String
associatedContentSearchableRole()
The Avalon Role for the associated Content Searchablevoid
configure(Configuration configuration)
protected Collection<String>
getContentTypes(AdditionalParameterValueMap additionalParameterValues)
Gets the content types which will be used to construct the query to filter the returned documentsprotected String
getDefinitionPrefix()
Gets the prefix for definitions (for facets, sorts...)String
getId()
Gets the id of the extensionReturnableSaxer
getSaxer(Collection<Returnable> allReturnables, AdditionalParameterValueMap additionalParameterValues)
Returns thesaxer
responsible to SAX hits of this Returnable.protected String
getViewForSax(AdditionalParameterValueMap additionalParameterValues)
Gets the view for saxing-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractContentBasedReturnable
_setAssociatedContentSearchable, contextualize, filterReturnedDocumentQuery, getFacets, getLabel, getSorts, initialize, langQueryProducer, relationsWith, service, sitemapQueryJoiner, siteQueryJoiner, tagQueryJoiner
-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractParameterAdder
additionalServiceParameters, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
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, selectedByDefault
-
-
-
-
Field Detail
-
_avalonRole
protected String _avalonRole
The Avalon role of this Returnable
-
_shortAvalonRole
protected String _shortAvalonRole
The "short version" of the Avalon role of this Returnable
-
_associatedContentSearchableRole
protected String _associatedContentSearchableRole
The associated content searchable role
-
_definitionPrefix
protected String _definitionPrefix
Theprefix
for facet and sort definitions
-
-
Constructor Detail
-
PrivateContentReturnable
public PrivateContentReturnable()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractContentBasedReturnable
- Throws:
ConfigurationException
-
associatedContentSearchableRole
protected String associatedContentSearchableRole()
Description copied from class:AbstractContentBasedReturnable
The Avalon Role for the associated Content Searchable- Specified by:
associatedContentSearchableRole
in classAbstractContentBasedReturnable
- Returns:
- The Avalon Role for the associated Content Searchable
-
getId
public String getId()
Description copied from interface:Returnable
Gets the id of the extension- Returns:
- the id of the extension
-
getContentTypes
protected Collection<String> getContentTypes(AdditionalParameterValueMap additionalParameterValues)
Description copied from class:AbstractContentBasedReturnable
Gets the content types which will be used to construct the query to filter the returned documents- Specified by:
getContentTypes
in classAbstractContentBasedReturnable
- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the content types which will be used to construct the query to filter the returned documents
-
_getAssociatedSearchable
protected PrivateContentSearchable _getAssociatedSearchable()
Gets the associatedPrivateContentSearchable
- Returns:
- the associated
PrivateContentSearchable
-
getSaxer
public ReturnableSaxer getSaxer(Collection<Returnable> allReturnables, AdditionalParameterValueMap additionalParameterValues)
Description copied from interface:Returnable
Returns thesaxer
responsible to SAX hits of this Returnable.- Parameters:
allReturnables
- AllReturnable
s (including this)additionalParameterValues
- The additional parameter values- Returns:
- the
saxer
responsible to SAX hits of this Returnable.
-
getViewForSax
protected String getViewForSax(AdditionalParameterValueMap additionalParameterValues)
Gets the view for saxing- Parameters:
additionalParameterValues
- The additional parameter values- Returns:
- the view for saxing
-
getDefinitionPrefix
protected String getDefinitionPrefix()
Description copied from class:AbstractContentBasedReturnable
Gets the prefix for definitions (for facets, sorts...)- Specified by:
getDefinitionPrefix
in classAbstractContentBasedReturnable
- Returns:
- the prefix for definitions
-
_initAvalonRole
protected void _initAvalonRole(Configuration configuration) throws ConfigurationException
Initializes_avalonRole
field from configuration- Parameters:
configuration
- The configuration- Throws:
ConfigurationException
- If a configuration value cannot be retrieved
-
_initShortAvalonRole
protected void _initShortAvalonRole()
Initializes_shortAvalonRole
field
-
_configureAssociatedContentReturnableRole
protected void _configureAssociatedContentReturnableRole(Configuration configuration) throws ConfigurationException
Initializes_associatedContentSearchableRole
field from configuration- Parameters:
configuration
- The configuration- Throws:
ConfigurationException
- If a configuration value cannot be retrieved
-
_initDefinitionPrefix
protected void _initDefinitionPrefix()
Initializes_definitionPrefix
field
-
-