public class ColumnHelper extends Object implements Component, Serviceable
columns
for search models.Modifier and Type | Class and Description |
---|---|
static class |
ColumnHelper.Column
A column and its (optional) label
|
(package private) static class |
ColumnHelper.ColumnTransformer |
Modifier and Type | Field and Description |
---|---|
protected ContentTypeExtensionPoint |
_cTypeEP
The content type extension point
|
protected ContentTypesHelper |
_cTypeHelper
The content type helper.
|
protected SystemPropertyExtensionPoint |
_systemPropEP
The system property extension point.
|
static String |
ROLE
The Avalon role
|
Constructor and Description |
---|
ColumnHelper() |
Modifier and Type | Method and Description |
---|---|
private List<String> |
_fieldNamesFromModel(IndexingModel indexingModel,
String prefix) |
private boolean |
_filterComposite(IndexingField field) |
private boolean |
_filterComposite(MetadataDefinition metaDef) |
private List<ColumnHelper.Column> |
_getColumns(Stream<String> columns,
Optional<String> contentTypeId) |
private List<String> |
_getFieldsForCompositeMetadata(MetadataDefinition lastMetadataDef,
String parentPath) |
private List<String> |
_getFieldsForContentMetadata(MetadataDefinition lastMetadataDef,
String parentPath) |
private List<String> |
_getFieldsForPath(String metadataPath,
ContentType commonContentType) |
private MetadataDefinition |
_getLastMetadataDefinition(String parentPath,
ContentType commonContentType) |
private String |
_leftTrim(String s) |
List<ColumnHelper.Column> |
getColumns(List<String> columns,
Optional<String> contentType)
From a list of string representing columns, returns the list of column ids with their (optional) labels.
|
List<ColumnHelper.Column> |
getColumns(String columnsStr,
Optional<String> contentType)
From a string representing columns, returns the list of column ids with their (optional) labels.
|
(package private) List<String> |
getWildcardMetadataColumnPaths(Optional<ContentType> optCommonContentType,
String metadataPath) |
(package private) List<String> |
getWildcardSystemColumnPaths(Optional<ContentType> optCommonContentType,
String path,
boolean allowComposite) |
(package private) boolean |
isWildcardColumn(String path) |
void |
service(ServiceManager manager) |
protected ContentTypeExtensionPoint _cTypeEP
protected ContentTypesHelper _cTypeHelper
protected SystemPropertyExtensionPoint _systemPropEP
public ColumnHelper()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public List<ColumnHelper.Column> getColumns(String columnsStr, Optional<String> contentType)
columnsStr
- The columns as a stringcontentType
- The common content typepublic List<ColumnHelper.Column> getColumns(List<String> columns, Optional<String> contentType)
columns
- The columnscontentType
- The common content typeprivate List<ColumnHelper.Column> _getColumns(Stream<String> columns, Optional<String> contentTypeId)
boolean isWildcardColumn(String path)
List<String> getWildcardMetadataColumnPaths(Optional<ContentType> optCommonContentType, String metadataPath) throws IllegalArgumentException
IllegalArgumentException
private MetadataDefinition _getLastMetadataDefinition(String parentPath, ContentType commonContentType)
private List<String> _getFieldsForPath(String metadataPath, ContentType commonContentType)
private List<String> _getFieldsForContentMetadata(MetadataDefinition lastMetadataDef, String parentPath)
private List<String> _getFieldsForCompositeMetadata(MetadataDefinition lastMetadataDef, String parentPath)
private List<String> _fieldNamesFromModel(IndexingModel indexingModel, String prefix)
private boolean _filterComposite(IndexingField field)
private boolean _filterComposite(MetadataDefinition metaDef)
List<String> getWildcardSystemColumnPaths(Optional<ContentType> optCommonContentType, String path, boolean allowComposite)