Class UserIndexableElementType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.model.type.AbstractModelItemType
org.ametys.core.model.type.AbstractElementType<UserIdentity>
org.ametys.cms.data.type.AbstractUserElementType
org.ametys.cms.data.type.indexing.impl.UserIndexableElementType
- All Implemented Interfaces:
IndexableElementType<UserIdentity>
,IndexableModelItemType
,SortableIndexableElementType<UserIdentity>
,ElementType<UserIdentity>
,ModelItemType
,LogEnabled
,PluginAware
,Component
,Serviceable
- Direct Known Subclasses:
UserRepositoryElementType
public class UserIndexableElementType
extends AbstractUserElementType
implements SortableIndexableElementType<UserIdentity>
Class for user type of elements that can be indexed
-
Field Summary
Fields inherited from class org.ametys.cms.data.type.AbstractUserElementType
_helper, _userManager
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.<X> X
Retrieves the formatted value to index<X> X
Retrieves the formatted value to indexGet the suffix for sortingvoid
indexSingleValue
(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, UserIdentity value, DataContext context) Index the given single value in a solr document.boolean
isFacetable
(DataContext context) Checks if data of this type is facetableMethods inherited from class org.ametys.cms.data.type.AbstractUserElementType
_singleValueFromXML, _singleValueToJSON, _singleValueToSAX, _useJSONForEdition, convertValue, fromJSONForClient, isSimple, service, toString
Methods inherited from class org.ametys.core.model.type.AbstractElementType
_compareMultipleValues, _compareSingleValues, _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
getTextFieldSuffix, getWildcardFieldSuffix
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
indexSingleSortValue, indexValue
-
Constructor Details
-
UserIndexableElementType
public UserIndexableElementType()
-
-
Method Details
-
indexSingleValue
public void indexSingleValue(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, UserIdentity value, DataContext context) Description copied from interface:IndexableElementType
Index the given single value in a solr document.- Specified by:
indexSingleValue
in interfaceIndexableElementType<UserIdentity>
- Parameters:
document
- the solr document to index into.rootObjectDocument
- the solr document of the root object.fieldName
- the name of the indexing fieldvalue
- the single value to indexcontext
- the context of the data to index. Can not be null.
-
getSingleValueToIndex
Description copied from interface:IndexableElementType
Retrieves the formatted value to index- Specified by:
getSingleValueToIndex
in interfaceIndexableElementType<UserIdentity>
- Type Parameters:
X
- Type of the value to retrieve- Parameters:
value
- the value to index- Returns:
- the formatted value
-
getSortFieldSuffix
Description copied from interface:SortableIndexableElementType
Get the suffix for sorting- Specified by:
getSortFieldSuffix
in interfaceSortableIndexableElementType<UserIdentity>
- Returns:
- The sort field suffix.
-
getSingleSortValueToIndex
Description copied from interface:SortableIndexableElementType
Retrieves the formatted value to index- Specified by:
getSingleSortValueToIndex
in interfaceSortableIndexableElementType<UserIdentity>
- Type Parameters:
X
- Type of the value to retrieve- Parameters:
value
- the value to index- Returns:
- the formatted value
-
getSchemaType
Description copied from interface:IndexableElementType
Get the solr schema type from the type.- Specified by:
getSchemaType
in interfaceIndexableElementType<UserIdentity>
- 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<UserIdentity>
- Parameters:
context
- the indexable data context- Returns:
- the indexing solr field suffix
-
isFacetable
Description copied from interface:IndexableElementType
Checks if data of this type is facetable- Specified by:
isFacetable
in interfaceIndexableElementType<UserIdentity>
- Parameters:
context
- the indexable data context- Returns:
true
if the type is facetable,false
otherwise
-