Class IndexableDataContext
java.lang.Object
org.ametys.runtime.model.type.DataContext
org.ametys.plugins.repository.model.RepositoryDataContext
org.ametys.cms.data.type.indexing.IndexableDataContext
Object that gives some context for data indexation manipulation
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new instance of aIndexableDataContext
protected
IndexableDataContext
(DataContext context) Creates a new instance of aIndexableDataContext
from anotherDataContext
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of aIndexableDataContext
, with the current context valuesGet the field name of full-text field.boolean
Determines if the value should be indexed for a fulltext field.static IndexableDataContext
Creates a new instance of aIndexableDataContext
static IndexableDataContext
newInstance
(DataContext context) Creates a new instance of aIndexableDataContext
from anotherDataContext
.<T extends IndexableDataContext>
TwithFullTextFieldName
(String fulltextFieldName) Set the field name of full-text field.<T extends IndexableDataContext>
TwithIndexForFullTextField
(boolean indexForFullTextField) Set totrue
to index the value for a fulltext field.Methods inherited from class org.ametys.plugins.repository.model.RepositoryDataContext
getExternalizableData, isDataExternalizable, withExternalizableData
Methods inherited from class org.ametys.runtime.model.type.DataContext
addSegmentToDataPath, addSuffixToLastSegment, getDataPath, getDataPathLastSegment, getFullDataPath, getLocale, getModelItem, getObjectId, getRootObjectId, getViewItem, renderEmptyValues, withDataPath, withEmptyValues, withFullDataPath, withLocale, withModelItem, withObjectId, withRootObjectId, withViewItem
-
Constructor Details
-
IndexableDataContext
protected IndexableDataContext()Creates a new instance of aIndexableDataContext
-
IndexableDataContext
Creates a new instance of aIndexableDataContext
from anotherDataContext
- Parameters:
context
- the data context to copy
-
-
Method Details
-
newInstance
Creates a new instance of aIndexableDataContext
- Returns:
- the created instance
-
newInstance
Creates a new instance of aIndexableDataContext
from anotherDataContext
. It can be the same implementation or another one, but it will be casted to the current implementation.- Parameters:
context
- the data context to copy- Returns:
- the created instance
-
cloneContext
Creates a new instance of aIndexableDataContext
, with the current context values- Overrides:
cloneContext
in classRepositoryDataContext
- Returns:
- the created instance
-
indexForFullTextField
Determines if the value should be indexed for a fulltext field. The fulltext field is given by thisIndexableDataContext
- Returns:
true
to index value for a fulltext field,false
otherwise.
-
withIndexForFullTextField
Set totrue
to index the value for a fulltext field. The fulltext field is given by thisIndexableDataContext
- Parameters:
indexForFullTextField
-true
to index the value for a fulltext field,false
otherwise- Returns:
- the current
IndexableDataContext
-
getFullTextFieldName
Get the field name of full-text field. Use if thisIndexableDataContext
is instanciated for full-text field- Returns:
- the field name of full-text field. Default to SolrFieldNames.SYSTEM_FULL
-
withFullTextFieldName
Set the field name of full-text field. Use if thisIndexableDataContext
is instanciated for full-text field- Parameters:
fulltextFieldName
- the full-text field name- Returns:
- the current
IndexableDataContext
-