Package org.ametys.cms.search.ui.model
Class ColumnHelper
java.lang.Object
org.ametys.cms.search.ui.model.ColumnHelper
- All Implemented Interfaces:
Component
,Serviceable
Component providing methods to manipulate
columns
for search models.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A column and its (optional) label -
Field Summary
Modifier and TypeFieldDescriptionprotected ContentTypeExtensionPoint
The content type extension pointprotected ContentTypesHelper
The content type helper.protected SystemPropertyExtensionPoint
The system property extension point.static final String
The Avalon role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateViewFromColumns
(Set<String> contentTypeIds, Collection<ColumnHelper.Column> columns, boolean mergeContainers) Creates aView
from the given columnsgetColumns
(String columnsStr, Set<String> contentTypeIds) From a string representing columns, returns the list of column ids with their (optional) labels.getColumns
(List<String> columns, Set<String> contentTypeIds) From a list of string representing columns, returns the list of column ids with their (optional) labels.void
service
(ServiceManager manager)
-
Field Details
-
ROLE
The Avalon role -
_cTypeEP
The content type extension point -
_cTypeHelper
The content type helper. -
_systemPropEP
The system property extension point.
-
-
Constructor Details
-
ColumnHelper
public ColumnHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getColumns
From a string representing columns, returns the list of column ids with their (optional) labels.- Parameters:
columnsStr
- The columns as a stringcontentTypeIds
- The common content type- Returns:
- the list of column ids with their (optional) labels.
-
getColumns
From a list of string representing columns, returns the list of column ids with their (optional) labels.- Parameters:
columns
- The columnscontentTypeIds
- The common content type- Returns:
- the list of column ids with their (optional) labels.
-
createViewFromColumns
public View createViewFromColumns(Set<String> contentTypeIds, Collection<ColumnHelper.Column> columns, boolean mergeContainers) Creates aView
from the given columns- Parameters:
contentTypeIds
- the reference content type identifiers.columns
- the columnsmergeContainers
- set totrue
to avoid to create new containers when they are already present in the given view item accessor- Returns:
- the created view
-