Package org.ametys.cms.search.cocoon
Class ContentGridComponent
- java.lang.Object
-
- org.ametys.cms.search.cocoon.ContentGridComponent
-
- All Implemented Interfaces:
Component
,Contextualizable
,Serviceable
public class ContentGridComponent extends Object implements Contextualizable, Serviceable, Component
Generates the columns information for the grid based upon a view of a contenttype
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_ametysObjectResolver
The AmetysObjectResolver instanceprotected ColumnHelper
_columnHelper
The helper for columnsprotected ContentHelper
_contentHelper
The ContentHelper instanceprotected ContentTypeExtensionPoint
_contentTypeExtensionPoint
The contenttypes extension pointprotected ContentTypesHelper
_contentTypesHelper
The ContentTypesHelper instanceprotected ContentValuesExtractorFactory
_contentValuesExtractorFactory
The ContentValuesExtractorFactoryprotected Context
_context
Cocoon contextprotected ServiceManager
_manager
The service managerprotected AmetysObjectResolver
_resolver
The Ametys object resolverprotected SearchUIModelHelper
_searchUIModelHelper
The search model helper.protected ServerCommHelper
_serverCommHelper
The servercomm helperstatic String
ROLE
The avalon role
-
Constructor Summary
Constructors Constructor Description ContentGridComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextualize(Context context)
Map<String,Object>
getColumnsAndValues(List<String> contentIds, String contentTypeId, String viewName)
Generates the columns informations for a View of a ContentTypeMap<String,Object>
getContentData(Content content, ContentValuesExtractorFactory.ContentValuesExtractor extractor, Locale defaultLocale, Map<String,Object> contextualParameters)
Generate standard content data.void
service(ServiceManager manager)
-
-
-
Field Detail
-
_serverCommHelper
protected ServerCommHelper _serverCommHelper
The servercomm helper
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys object resolver
-
_contentTypeExtensionPoint
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
The contenttypes extension point
-
_searchUIModelHelper
protected SearchUIModelHelper _searchUIModelHelper
The search model helper.
-
_columnHelper
protected ColumnHelper _columnHelper
The helper for columns
-
_manager
protected ServiceManager _manager
The service manager
-
_contentValuesExtractorFactory
protected ContentValuesExtractorFactory _contentValuesExtractorFactory
The ContentValuesExtractorFactory
-
_ametysObjectResolver
protected AmetysObjectResolver _ametysObjectResolver
The AmetysObjectResolver instance
-
_contentTypesHelper
protected ContentTypesHelper _contentTypesHelper
The ContentTypesHelper instance
-
_contentHelper
protected ContentHelper _contentHelper
The ContentHelper instance
-
-
Constructor Detail
-
ContentGridComponent
public ContentGridComponent()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getColumnsAndValues
public Map<String,Object> getColumnsAndValues(List<String> contentIds, String contentTypeId, String viewName) throws ProcessingException, IllegalArgumentException
Generates the columns informations for a View of a ContentType- Parameters:
contentIds
- The contents identifierscontentTypeId
- The content type id. Mandatory.viewName
- The view of the content type.- Returns:
- The columns informations
- Throws:
IllegalArgumentException
- If one argument is not as expectedProcessingException
- If an error occurred while processing the columns
-
getContentData
public Map<String,Object> getContentData(Content content, ContentValuesExtractorFactory.ContentValuesExtractor extractor, Locale defaultLocale, Map<String,Object> contextualParameters)
Generate standard content data.- Parameters:
content
- The content.extractor
- The content values extractor which generates.defaultLocale
- the default locale for localized values if content's language is null.contextualParameters
- The search contextual parameters.- Returns:
- A Map containing the content data.
-
-