Class AbstractSourceFieldDataType
- java.lang.Object
-
- lumis.doui.datatype.AbstractDouiDataType
-
- lumis.doui.source.field.type.AbstractSourceFieldDataType
-
- All Implemented Interfaces:
IDouiDataType
,ISourceFieldDataType
- Direct Known Subclasses:
AnyDataType
,BooleanDataType
,CategorizationDataType
,ChannelDataType
,ContentParentContentDataType
,DateDataType
,DateTimeDataType
,DoubleDataType
,EmailDataType
,FileDataType
,FilesDataType
,IntegerDataType
,LocaleMetaDataDataType
,LongDataType
,PageDataType
,PageOrPageTemplateDataType
,PageTemplateDataType
,ParentContentDataType
,PasswordDataType
,PrincipalDataType
,ResourcesDataType
,StringDataType
,TagDataType
,TimeDataType
,WorkflowStateDataType
@StableMinor(version="14.0", sinceVersion="4.0") public abstract class AbstractSourceFieldDataType extends AbstractDouiDataType implements ISourceFieldDataType
Base implementation for theISourceFieldDataType
interface.- Since:
- 4.0.4
- Version:
- $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSourceFieldDataType()
Creates a source field data type.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Map<String,? extends Serializable>
getDocumentFieldValues(Object value)
Returns the document field values to be stored in big data for a given value.Map<String,? extends IDocumentTypeFieldBuilder<?>>
getDocumentTypeFieldTemplates()
Returns the document type field templates to be used as a base bysource fields
to create their document type fields.abstract String
getQueryDataType()
Returns aQueryFieldTypes
constant for a query data type the value of this source field data type is best suited to be kept in.void
init(ISourceContext sourceContext)
Initializes this source field data type.-
Methods inherited from class lumis.doui.datatype.AbstractDouiDataType
createConverter, equals, getConverter, getDefaultFilterControlType, getDefaultInputControlType, getDefaultViewControlType, getDefinitionLocale, getDefinitionPattern, getId, getValueClass, hashCode, isComplexDataType, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface lumis.doui.datatype.IDouiDataType
getConverter, getDefaultFilterControlType, getDefaultInputControlType, getDefaultViewControlType, getDefinitionLocale, getDefinitionPattern, getId, getValueClass, isComplexDataType
-
Methods inherited from interface lumis.doui.source.field.type.ISourceFieldDataType
postAdd, postDelete, postUpdate, preAdd, preDelete, preUpdate
-
-
-
-
Method Detail
-
init
public void init(ISourceContext sourceContext) throws PortalException
Initializes this source field data type.Calls
ISourceConverter.init(ISourceContext)
if this data type's converter implementsISourceConverter
.- Specified by:
init
in interfaceISourceFieldDataType
- Parameters:
sourceContext
- the source context where this data type will be used in.- Throws:
PortalException
-
getQueryDataType
public abstract String getQueryDataType()
Description copied from interface:ISourceFieldDataType
Returns aQueryFieldTypes
constant for a query data type the value of this source field data type is best suited to be kept in.- Specified by:
getQueryDataType
in interfaceISourceFieldDataType
- Returns:
- a
QueryFieldTypes
constant.
-
getDocumentTypeFieldTemplates
public Map<String,? extends IDocumentTypeFieldBuilder<?>> getDocumentTypeFieldTemplates()
Description copied from interface:ISourceFieldDataType
Returns the document type field templates to be used as a base bysource fields
to create their document type fields.The returned value is a map where the key is an identifier suffix to use on the document field identifier. This suffix will be appended to the source field's base identifier in the document. The key may be
null
to indicate that the source field's base identifier is to be used for the document field. The key must not be an empty string.The value of the map is a
IDocumentTypeFieldBuilder
to be used as a base to the respective document type field. The builder's id will be set by the source field and does not need to be specified. TheIDocumentTypeFieldBuilder.setIncludeInGlobalSearch(boolean)
is to be set totrue
if the document field may be included in global search. If it is set totrue
and the source field issearchable
, then the final document type field generated will have this property set totrue
. Otherwise it will befalse
.- Specified by:
getDocumentTypeFieldTemplates
in interfaceISourceFieldDataType
- Returns:
- a map where the key is a relative document field identifier and the value is a document type field builder to be used as a base to the respective document type field.
- See Also:
ISourceFieldDataType.getDocumentFieldValues(Object)
-
getDocumentFieldValues
public Map<String,? extends Serializable> getDocumentFieldValues(Object value)
Description copied from interface:ISourceFieldDataType
Returns the document field values to be stored in big data for a given value.- Specified by:
getDocumentFieldValues
in interfaceISourceFieldDataType
- Parameters:
value
- a value, of typeIDouiDataType.getValueClass()
or of a type thatIDouiDataType.getConverter()
is able to convert toIDouiDataType.getValueClass()
.- Returns:
- a map where the key is a suffix for the document field identifier, and the value is the value to use as
the value of the respective document field. The key is the same used to define document type fields in
ISourceFieldDataType.getDocumentTypeFieldTemplates()
. - See Also:
ISourceFieldDataType.getDocumentTypeFieldTemplates()
-
-