Class SystemSearchUIColumn
- java.lang.Object
-
- org.ametys.runtime.parameter.Parameter<MetadataType>
-
- org.ametys.cms.search.ui.model.impl.AbstractSearchUIColumn
-
- org.ametys.cms.search.ui.model.impl.SystemSearchUIColumn
-
- All Implemented Interfaces:
Field
,ResultField
,SystemResultField
,SearchUIColumn
,LogEnabled
,Disposable
,Configurable
,Contextualizable
,Serviceable
public class SystemSearchUIColumn extends AbstractSearchUIColumn implements SystemResultField, Contextualizable, LogEnabled, Configurable, Serviceable, Disposable
This class is a search column on a system property (author, lastModified, with-comments, ...)
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentHelper
_contentHelper
The content helper.protected ContentTypesHelper
_contentTypeHelper
The content type helper.private Set<String>
_contentTypes
The content typesprivate Context
_context
protected ContentTypeExtensionPoint
_cTypeEP
The content type extension point.protected ThreadSafeComponentManager<Enumerator>
_enumeratorManager
ComponentManager forEnumerator
s.protected String
_joinPaths
The join paths.private org.slf4j.Logger
_logger
private ServiceManager
_manager
protected AmetysObjectResolver
_resolver
The Ametys object resolver.protected SystemPropertyExtensionPoint
_systemPropEP
The system property extension point.protected SystemProperty
_systemProperty
The system property.
-
Constructor Summary
Constructors Constructor Description SystemSearchUIColumn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Object
_getValue(Content content, boolean full)
private String
_initializeEnumerator(SystemProperty.EnumeratorDefinition enumDef)
void
configure(Configuration configuration)
void
contextualize(Context context)
void
dispose()
String
getFieldPath()
Get the field path (separated by '/').Object
getFullValue(Content content, Locale defaultLocale)
Get the value represented by this field in the given result content.SearchField
getSearchField()
Get theSearchField
representing this result field.String
getSystemPropertyId()
Get the system property nameObject
getValue(Content content, Locale defaultLocale)
Get the value represented by this field in the given result content.void
service(ServiceManager manager)
void
setLogger(org.slf4j.Logger logger)
Called at creation time to provide aLogger
.private boolean
testMultiple(Set<String> contentTypeIds)
-
Methods inherited from class org.ametys.cms.search.ui.model.impl.AbstractSearchUIColumn
_configureI18nizableText, getContentTypeId, getConverter, getDefaultSorter, getRenderer, getWidth, isEditable, isHidden, isMultiple, isSortable, setContentTypeId, setConverter, setDefaultSorter, setEditable, setHidden, setMultiple, setRenderer, setSortable, setWidth
-
Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.search.model.Field
getContentTypeId, getEnumerator, getType, isMultiple
-
Methods inherited from interface org.ametys.cms.search.model.ResultField
getId
-
Methods inherited from interface org.ametys.cms.search.ui.model.SearchUIColumn
getDescription, getLabel, getValidator, getWidget, getWidgetParameters
-
-
-
-
Field Detail
-
_enumeratorManager
protected ThreadSafeComponentManager<Enumerator> _enumeratorManager
ComponentManager forEnumerator
s.
-
_systemPropEP
protected SystemPropertyExtensionPoint _systemPropEP
The system property extension point.
-
_cTypeEP
protected ContentTypeExtensionPoint _cTypeEP
The content type extension point.
-
_contentHelper
protected ContentHelper _contentHelper
The content helper.
-
_contentTypeHelper
protected ContentTypesHelper _contentTypeHelper
The content type helper.
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys object resolver.
-
_systemProperty
protected SystemProperty _systemProperty
The system property.
-
_joinPaths
protected String _joinPaths
The join paths.
-
_contentTypes
private Set<String> _contentTypes
The content types
-
_manager
private ServiceManager _manager
-
_logger
private org.slf4j.Logger _logger
-
-
Constructor Detail
-
SystemSearchUIColumn
public SystemSearchUIColumn()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
setLogger
public void setLogger(org.slf4j.Logger logger)
Description copied from interface:LogEnabled
Called at creation time to provide aLogger
.- Specified by:
setLogger
in interfaceLogEnabled
- Parameters:
logger
- aLogger
for messages.
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceDisposable
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
testMultiple
private boolean testMultiple(Set<String> contentTypeIds)
-
getFieldPath
public String getFieldPath()
Description copied from interface:SystemResultField
Get the field path (separated by '/').- Specified by:
getFieldPath
in interfaceSystemResultField
- Returns:
- the field path.
-
getSystemPropertyId
public String getSystemPropertyId()
Get the system property name- Specified by:
getSystemPropertyId
in interfaceSystemResultField
- Returns:
- The property name
-
getValue
public Object getValue(Content content, Locale defaultLocale)
Description copied from interface:ResultField
Get the value represented by this field in the given result content.- Specified by:
getValue
in interfaceResultField
- Parameters:
content
- the result content.defaultLocale
- the default locale for localized value if the content's language is null- Returns:
- the content field value (cast to the appropriate object).
-
getFullValue
public Object getFullValue(Content content, Locale defaultLocale)
Description copied from interface:ResultField
Get the value represented by this field in the given result content.- Specified by:
getFullValue
in interfaceResultField
- Parameters:
content
- the result content.defaultLocale
- the default locale for localized value if the content's language is null- Returns:
- the content field value (cast to the appropriate object).
-
getSearchField
public SearchField getSearchField()
Description copied from interface:ResultField
Get theSearchField
representing this result field.- Specified by:
getSearchField
in interfaceResultField
- Overrides:
getSearchField
in classAbstractSearchUIColumn
- Returns:
- The
SearchField
representing this result field.
-
_initializeEnumerator
private String _initializeEnumerator(SystemProperty.EnumeratorDefinition enumDef)
-
-