Class FileIndexableElementType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.model.type.AbstractModelItemType
org.ametys.core.model.type.AbstractElementType<File>
org.ametys.cms.data.type.AbstractFileElementType
org.ametys.cms.data.type.indexing.impl.FileIndexableElementType
- All Implemented Interfaces:
IndexableElementType<File>
,IndexableModelItemType
,ElementType<File>
,ModelItemType
,LogEnabled
,PluginAware
,Component
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
FileRepositoryElementType
public class FileIndexableElementType
extends AbstractFileElementType
implements IndexableElementType<File>
Class for file type of elements that can be indexed
-
Field Summary
Fields inherited from class org.ametys.cms.data.type.AbstractFileElementType
__EXPLORER_FILE_TYPE, _binaryType, _context, _resolver, _uploadManager, _userProvider
Fields inherited from class org.ametys.core.model.type.AbstractElementType
_jsonUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the solr schema type from the type.void
indexSingleValue
(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, File value, IndexableDataContext context) Index the given single value in a solr document.void
indexSingleValueForFullTextField
(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, File value, IndexableDataContext context) Index the given single value in a full-text field of solr document.Methods inherited from class org.ametys.cms.data.type.AbstractFileElementType
_compareMultipleValues, _compareSingleValues, _isMultiple, _isSingle, _singleValueFromXML, _useJSONForEdition, _valueToSAX, configure, contextualize, convertValue, fromJSONForClient, isCompatible, isSimple, service, toString, valueToJSONForClient, valueToJSONForEdition
Methods inherited from class org.ametys.core.model.type.AbstractElementType
_getValueAttributes, _isValueFromXMLMultiple, _singleValueToJSON, _singleValueToJSONForEdition, _singleValueToSAX, _valueToJSON, _valueToSAX, _valueToSAXForEdition, castValue, compareValues, getManagedClass, getManagedClassArray, parseConfiguration, valueFromXML, 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
getIndexingFieldSuffix, getSingleValueToIndex, getTextFieldSuffix, getWildcardFieldSuffix, indexValue, 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
-
Constructor Details
-
FileIndexableElementType
public FileIndexableElementType()
-
-
Method Details
-
indexSingleValue
public void indexSingleValue(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, String fieldName, File value, IndexableDataContext context) Description copied from interface:IndexableElementType
Index the given single value in a solr document.- Specified by:
indexSingleValue
in interfaceIndexableElementType<File>
- 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.
-
indexSingleValueForFullTextField
public void indexSingleValueForFullTextField(org.apache.solr.common.SolrInputDocument document, org.apache.solr.common.SolrInputDocument rootObjectDocument, File value, IndexableDataContext context) Description copied from interface:IndexableElementType
Index the given single value in a full-text field of solr document. The solr full-text field name is given by the data context.- Specified by:
indexSingleValueForFullTextField
in interfaceIndexableElementType<File>
- Parameters:
document
- the solr document to index into.rootObjectDocument
- the solr document of the root object.value
- the single value to index in fulltext field.context
- the context of the data to index. Can not be null.
-
getSchemaType
Description copied from interface:IndexableElementType
Get the solr schema type from the type.- Specified by:
getSchemaType
in interfaceIndexableElementType<File>
- Returns:
- The solr schema type.
-