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
FieldsModifier and TypeFieldDescriptionprotected AmetysObjectResolverThe AmetysObjectResolver instanceprotected ColumnHelperThe helper for columnsprotected ContentHelperThe ContentHelper instanceprotected ContentTypeExtensionPointThe contenttypes extension pointprotected ContentTypesHelperThe ContentTypesHelper instanceprotected ContentValuesExtractorFactoryThe ContentValuesExtractorFactoryprotected ContextCocoon contextprotected ServiceManagerThe service managerprotected AmetysObjectResolverThe Ametys object resolverprotected RightManagerThe right managerprotected ServerCommHelperThe servercomm helperstatic final StringThe avalon role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(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.voidservice(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 -
_rightManager
The right manager
-
-
Constructor Details
-
ContentGridComponent
public ContentGridComponent()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein 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.
-