Class MultilingualStringIndexableElementType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.model.type.AbstractModelItemType
org.ametys.core.model.type.AbstractElementType<MultilingualString>
org.ametys.cms.data.type.AbstractMultilingualStringElementType
org.ametys.cms.data.type.indexing.impl.MultilingualStringIndexableElementType
- All Implemented Interfaces:
IndexableElementType<MultilingualString>
,IndexableModelItemType
,SortableIndexableElementType<MultilingualString>
,ElementType<MultilingualString>
,ModelItemType
,LogEnabled
,PluginAware
,Component
,Serviceable
- Direct Known Subclasses:
MultilingualStringRepositoryElementType
public class MultilingualStringIndexableElementType
extends AbstractMultilingualStringElementType
implements SortableIndexableElementType<MultilingualString>
Class for multilingual string type of elements that can be indexed
-
Field Summary
Fields inherited from class org.ametys.core.model.type.AbstractElementType
_jsonUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetIndexingFieldSuffix
(DataContext context) Retrieves the indexing solr field suffix for this typeGet the solr schema type from the type.Get the suffix for sortingvoid
indexSingleSortValue
(org.apache.solr.common.SolrInputDocument document, String fieldName, MultilingualString multilingualString, DataContext context) Index the given single value in sort field in a solr document.void
indexSingleValue
(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, MultilingualString multilingualString, DataContext context) Index the given single value in a solr document.void
service
(ServiceManager manager) Methods inherited from class org.ametys.cms.data.type.AbstractMultilingualStringElementType
_compareMultipleValues, _compareSingleValues, _singleValueFromXML, _singleValueToJSON, _singleValueToSAX, _useJSONForEdition, convertValue, fromJSONForClient, isSimple, toString
Methods inherited from class org.ametys.core.model.type.AbstractElementType
_getValueAttributes, _isMultiple, _isSingle, _isValueFromXMLMultiple, _singleValueToJSONForEdition, _valueToJSON, _valueToSAX, _valueToSAX, _valueToSAXForEdition, castValue, compareValues, getManagedClass, getManagedClassArray, isCompatible, parseConfiguration, valueFromXML, valueToJSONForClient, valueToJSONForEdition, valueToSAX, valueToSAXForEdition
Methods inherited from class org.ametys.core.model.type.AbstractModelItemType
getId, 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.runtime.model.type.ElementType
castValue, compareValues, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueFromXML
Methods inherited from interface org.ametys.cms.data.type.indexing.IndexableElementType
getSingleValueToIndex, getTextFieldSuffix, getWildcardFieldSuffix, isFacetable
Methods inherited from interface org.ametys.runtime.model.type.ModelItemType
getId, valueToJSONForClient, valueToJSONForClient, valueToJSONForEdition, valueToSAX, valueToSAX, valueToSAXForEdition
Methods inherited from interface org.ametys.runtime.plugin.component.PluginAware
setPluginInfo
Methods inherited from interface org.ametys.cms.data.type.indexing.SortableIndexableElementType
getSingleSortValueToIndex, indexValue
-
Field Details
-
_languagesManager
The manager for languages
-
-
Constructor Details
-
MultilingualStringIndexableElementType
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractElementType<MultilingualString>
- Throws:
ServiceException
-
indexSingleValue
public void indexSingleValue(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, MultilingualString multilingualString, DataContext context) Description copied from interface:IndexableElementType
Index the given single value in a solr document.- Specified by:
indexSingleValue
in interfaceIndexableElementType<MultilingualString>
- Parameters:
document
- the solr document to index into.rootObjectDocument
- the solr document of the root object.fieldName
- the name of the indexing fieldmultilingualString
- the single value to indexcontext
- the context of the data to index. Can not be null.
-
indexSingleSortValue
public void indexSingleSortValue(org.apache.solr.common.SolrInputDocument document, String fieldName, MultilingualString multilingualString, DataContext context) Description copied from interface:SortableIndexableElementType
Index the given single value in sort field in a solr document.- Specified by:
indexSingleSortValue
in interfaceSortableIndexableElementType<MultilingualString>
- Parameters:
document
- the solr document to index into.fieldName
- the name of the indexing fieldmultilingualString
- the single value to indexcontext
- the context of the data to index. Can not be null.
-
getSortFieldSuffix
Description copied from interface:SortableIndexableElementType
Get the suffix for sorting- Specified by:
getSortFieldSuffix
in interfaceSortableIndexableElementType<MultilingualString>
- Returns:
- The sort field suffix.
-
getSchemaType
Description copied from interface:IndexableElementType
Get the solr schema type from the type.- Specified by:
getSchemaType
in interfaceIndexableElementType<MultilingualString>
- Returns:
- The solr schema type.
-
getIndexingFieldSuffix
Description copied from interface:IndexableElementType
Retrieves the indexing solr field suffix for this type- Specified by:
getIndexingFieldSuffix
in interfaceIndexableElementType<MultilingualString>
- Parameters:
context
- the indexable data context- Returns:
- the indexing solr field suffix
-