Package org.ametys.cms.search.systemprop
Class TagsSystemProperty
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.search.systemprop.AbstractSystemProperty
org.ametys.cms.search.systemprop.TagsSystemProperty
- All Implemented Interfaces:
SystemProperty
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
TagsSystemProperty
SystemProperty
which represents the tags of a Content.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.search.model.SystemProperty
SystemProperty.EnumeratorDefinition
-
Field Summary
Modifier and TypeFieldDescriptionprotected JSONUtils
The JSON utilsprotected TagProviderExtensionPoint
The tag provider extension point.Fields inherited from class org.ametys.cms.search.systemprop.AbstractSystemProperty
_description, _i18nUtils, _id, _label, _pluginName, _resolver, _userHelper, _userManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the property column converter.getJsonValue
(Content content, boolean full) Get the jsonified valuegetQuery
(Object value, Query.Operator operator, String language, Map<String, Object> contextualParameters) Get theQuery
associated to the given value.Get the renderer.Get the schema definitions brought by this property.Get theSearchField
representing this system property.getTagContextualParameters
(Content content) Get the tags contextual parameters.getType()
Get the property type.Get the typed raw value for this field in the given result content.Get the default widget to use when rendering this property as a criterion.getWidgetParameters
(Configuration configuration) Get the widget parameters.void
Index the system property in a solr document.protected boolean
isAutopostingEnabled
(Content content) Test if autoposting is enabled.boolean
Get the multiple status of the property.boolean
Get if the property can be sorted on.void
saxValue
(ContentHandler handler, Content content) SAX the valuevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.cms.search.systemprop.AbstractSystemProperty
_indexBooleanValue, _indexBooleanValues, _indexDateValue, _indexDateValues, _indexDoubleValue, _indexDoubleValues, _indexGeocodeValue, _indexLongValue, _indexLongValues, _indexStringValue, _indexStringValues, _indexUserValue, _indexUserValues, _parseI18nizableText, configure, getDescription, getId, getLabel, getSortValue, parseBoolean, parseDate, parseDouble, parseLong, parseString, parseStringArray, parseUserArray, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
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.SystemProperty
getColumnWidth, getContentTypeId, getEnumeratorDefinition, isDisplayable, isFacetable, isSearchable
-
Field Details
-
_tagProviderEP
The tag provider extension point. -
_jsonUtils
The JSON utils
-
-
Constructor Details
-
TagsSystemProperty
public TagsSystemProperty()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSystemProperty
- Throws:
ServiceException
-
getType
Description copied from interface:SystemProperty
Get the property type.- Returns:
- the property type.
-
isMultiple
Description copied from interface:SystemProperty
Get the multiple status of the property.- Returns:
true
if the property can have multiple values,false
otherwise.
-
isSortable
Description copied from interface:SystemProperty
Get if the property can be sorted on.- Returns:
true
if the property can be sorted on,false
otherwise.
-
getQuery
public Query getQuery(Object value, Query.Operator operator, String language, Map<String, Object> contextualParameters) Description copied from interface:SystemProperty
Get theQuery
associated to the given value.- Parameters:
value
- the user-submitted value for this property.operator
- In advanced search mode, the operator chosen by the user.null
to use the criterion-defined operator (simple search mode).language
- The current search language.contextualParameters
- the search contextual parameters.- Returns:
- The
Query
associated to the given value.
-
getSearchField
Description copied from interface:SystemProperty
Get theSearchField
representing this system property.- Returns:
- The search field representing this system property.
-
getWidget
Description copied from interface:SystemProperty
Get the default widget to use when rendering this property as a criterion.- Returns:
- The default widget to use, or
null
if no specific widget is necessary.
-
getWidgetParameters
Description copied from interface:SystemProperty
Get the widget parameters.- Parameters:
configuration
- The system property configuration- Returns:
- The widget parameters as a Map.
-
getRenderer
Description copied from interface:SystemProperty
Get the renderer.- Returns:
- The column renderer.
-
getConverter
Description copied from interface:SystemProperty
Get the property column converter.- Returns:
- The property column converter.
-
index
Description copied from interface:SystemProperty
Index the system property in a solr document.- Specified by:
index
in interfaceSystemProperty
- Overrides:
index
in classAbstractSystemProperty
- Parameters:
content
- The content to index.document
- The solr document to index into.
-
getValue
Description copied from interface:SystemProperty
Get the typed raw value for this field in the given result content. The returned object depends on this field's type:
-MetadataType.STRING
must return String or String[] if multiple
-MetadataType.DATE
orMetadataType.DATETIME
must return Date or Date[] if multiple
-MetadataType.LONG
must return Long or Long[] if multiple
-MetadataType.DOUBLE
must return Double or Double[] if multiple
-MetadataType.CONTENT
must return String or String[] if multiple
-MetadataType.GEOCODE
must return Map<String, Double>
-MetadataType.USER
must return UserIdentity or UserIdentity[] if multiple
-MetadataType.MULTILINGUAL_STRING
must returnMultilingualString
Others types are not supported.- Parameters:
content
- The result content- Returns:
- The typed value, cast to the appropriate object according its type.
-
getJsonValue
Description copied from interface:SystemProperty
Get the jsonified value- Parameters:
content
- the result contentfull
-true
to get full value.- Returns:
- the content field value
-
saxValue
Description copied from interface:SystemProperty
SAX the value- Specified by:
saxValue
in interfaceSystemProperty
- Overrides:
saxValue
in classAbstractSystemProperty
- Parameters:
handler
- The content handler to sax intocontent
- The content- Throws:
SAXException
- If an error occurred while saxing
-
getTagContextualParameters
Get the tags contextual parameters.- Parameters:
content
- The content.- Returns:
- the tags contextual parameters.
-
isAutopostingEnabled
Test if autoposting is enabled.- Parameters:
content
- The content.- Returns:
- true if enabled.
-
getSchemaDefinitions
Description copied from interface:SystemProperty
Get the schema definitions brought by this property.- Specified by:
getSchemaDefinitions
in interfaceSystemProperty
- Overrides:
getSchemaDefinitions
in classAbstractSystemProperty
- Returns:
- The schema definitions used by this property.
-