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
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
The AmetysObjectResolver instanceprotected ColumnHelper
The helper for columnsprotected ContentHelper
The ContentHelper instanceprotected ContentTypeExtensionPoint
The contenttypes extension pointprotected ContentTypesHelper
The ContentTypesHelper instanceprotected ContentValuesExtractorFactory
The ContentValuesExtractorFactoryprotected Context
Cocoon contextprotected ServiceManager
The service managerprotected AmetysObjectResolver
The Ametys object resolverprotected ServerCommHelper
The servercomm helperstatic final String
The avalon role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) getColumnsAndValues
(List<String> contentIds, String contentTypeId, String viewName) Generates the columns informations for a View of a ContentTypegetContentData
(Content content, ContentValuesExtractorFactory.ContentValuesExtractor extractor, Locale defaultLocale, Map<String, Object> contextualParameters) Generate standard content data.void
service
(ServiceManager manager)
-
Field Details
-
ROLE
The avalon role -
_serverCommHelper
The servercomm helper -
_resolver
The Ametys object resolver -
_contentTypeExtensionPoint
The contenttypes extension point -
_context
Cocoon context -
_columnHelper
The helper for columns -
_manager
The service manager -
_contentValuesExtractorFactory
The ContentValuesExtractorFactory -
_ametysObjectResolver
The AmetysObjectResolver instance -
_contentTypesHelper
The ContentTypesHelper instance -
_contentHelper
The ContentHelper instance
-
-
Constructor Details
-
ContentGridComponent
public ContentGridComponent()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getColumnsAndValues
public Map<String,Object> getColumnsAndValues(List<String> contentIds, String contentTypeId, String viewName) throws IllegalStateException, IllegalArgumentException, ProcessingException 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 expectedIllegalStateException
- If an error occurred while processing the columnsProcessingException
- if an error occurs while generating columns infos
-
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.
-