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_contentHelperThe content helper.protected ContentTypesHelper_contentTypeHelperThe content type helper.private Set<String>_contentTypesThe content typesprivate Context_contextprotected ContentTypeExtensionPoint_cTypeEPThe content type extension point.protected ThreadSafeComponentManager<Enumerator>_enumeratorManagerComponentManager forEnumerators.protected String_joinPathsThe join paths.private org.slf4j.Logger_loggerprivate ServiceManager_managerprotected AmetysObjectResolver_resolverThe Ametys object resolver.protected SystemPropertyExtensionPoint_systemPropEPThe system property extension point.protected SystemProperty_systemPropertyThe 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)voidconfigure(Configuration configuration)voidcontextualize(Context context)voiddispose()StringgetFieldPath()Get the field path (separated by '/').ObjectgetFullValue(Content content, Locale defaultLocale)Get the value represented by this field in the given result content.SearchFieldgetSearchField()Get theSearchFieldrepresenting this result field.Map<String,SearchUIColumn>getSubColumns()Get the subcolumns informations (for repeaters for example)StringgetSystemPropertyId()Get the system property nameObjectgetValue(Content content, Locale defaultLocale)Get the value represented by this field in the given result content.voidservice(ServiceManager manager)voidsetLogger(org.slf4j.Logger logger)Called at creation time to provide aLogger.private booleantestMultiple(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 forEnumerators.
-
_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:
contextualizein interfaceContextualizable- Throws:
ContextException
-
setLogger
public void setLogger(org.slf4j.Logger logger)
Description copied from interface:LogEnabledCalled at creation time to provide aLogger.- Specified by:
setLoggerin interfaceLogEnabled- Parameters:
logger- aLoggerfor messages.
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
dispose
public void dispose()
- Specified by:
disposein interfaceDisposable
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
testMultiple
private boolean testMultiple(Set<String> contentTypeIds)
-
getFieldPath
public String getFieldPath()
Description copied from interface:SystemResultFieldGet the field path (separated by '/').- Specified by:
getFieldPathin interfaceSystemResultField- Returns:
- the field path.
-
getSystemPropertyId
public String getSystemPropertyId()
Get the system property name- Specified by:
getSystemPropertyIdin interfaceSystemResultField- Returns:
- The property name
-
getValue
public Object getValue(Content content, Locale defaultLocale)
Description copied from interface:ResultFieldGet the value represented by this field in the given result content.- Specified by:
getValuein 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:ResultFieldGet the value represented by this field in the given result content.- Specified by:
getFullValuein 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:ResultFieldGet theSearchFieldrepresenting this result field.- Specified by:
getSearchFieldin interfaceResultField- Overrides:
getSearchFieldin classAbstractSearchUIColumn- Returns:
- The
SearchFieldrepresenting this result field.
-
_initializeEnumerator
private String _initializeEnumerator(SystemProperty.EnumeratorDefinition enumDef)
-
getSubColumns
public Map<String,SearchUIColumn> getSubColumns()
Description copied from interface:SearchUIColumnGet the subcolumns informations (for repeaters for example)- Specified by:
getSubColumnsin interfaceSearchUIColumn- Returns:
- the full columns informations or
nullif none is defined.
-
-