Class HtmlDataType
- java.lang.Object
-
- lumis.doui.datatype.AbstractDouiDataType
-
- lumis.doui.source.field.type.AbstractSourceFieldDataType
-
- lumis.doui.source.field.type.StringDataType
-
- lumis.doui.source.field.type.TextDataType
-
- lumis.doui.source.field.type.HtmlDataType
-
- All Implemented Interfaces:
IDouiDataType
,ISourceFieldDataType
public class HtmlDataType extends TextDataType
A html data type.- Since:
- 4.0.4
- Version:
- $Revision: 24271 $ $Date: 2020-12-09 22:17:18 -0300 (Wed, 09 Dec 2020) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HtmlDataType.Data
Data object for a html.
-
Constructor Summary
Constructors Constructor Description HtmlDataType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IConverter
createConverter()
Creates the converter instance that will be used by this data type.String
getDefaultInputControlType()
Returns the default input control type for this data type.String
getDefaultViewControlType()
Returns the default control type for viewing this data type's values.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.String
getId()
Returns the id for this data type.Class<? extends HtmlDataType.Data>
getValueClass()
Returns the value class for data of this type.boolean
isComplexDataType()
Returns true if when value is a complex data type.void
postAdd(ISourceField field, SourcePostAddDataEvent event)
Method called by default for each source field after data is added.void
preAdd(ISourceField field, SourcePreAddDataEvent event)
Method called by default for each source field before data is added.void
preDelete(ISourceField field, SourcePreDeleteDataEvent event)
Method called by default for each source field before data is deleted.void
preUpdate(ISourceField field, SourcePreUpdateDataEvent event)
Method called by default for each source field before data is updated.-
Methods inherited from class lumis.doui.source.field.type.TextDataType
getQueryDataType
-
Methods inherited from class lumis.doui.source.field.type.AbstractSourceFieldDataType
getDocumentFieldValues, init
-
Methods inherited from class lumis.doui.datatype.AbstractDouiDataType
equals, getConverter, getDefaultFilterControlType, getDefinitionLocale, getDefinitionPattern, hashCode, 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, getDefinitionLocale, getDefinitionPattern
-
Methods inherited from interface lumis.doui.source.field.type.ISourceFieldDataType
postDelete, postUpdate
-
-
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:IDouiDataType
Returns the id for this data type.- Specified by:
getId
in interfaceIDouiDataType
- Overrides:
getId
in classTextDataType
- Returns:
- the id for this data type.
-
getDefaultInputControlType
public String getDefaultInputControlType()
Description copied from interface:IDouiDataType
Returns the default input control type for this data type.- Specified by:
getDefaultInputControlType
in interfaceIDouiDataType
- Overrides:
getDefaultInputControlType
in classTextDataType
- Returns:
- the default input control type for this data type, or null if this data type has no default input control type.
-
getDefaultViewControlType
public String getDefaultViewControlType()
Description copied from interface:IDouiDataType
Returns the default control type for viewing this data type's values.- Specified by:
getDefaultViewControlType
in interfaceIDouiDataType
- Overrides:
getDefaultViewControlType
in classAbstractDouiDataType
- Returns:
- the default control type for viewing this data type, or null if this data type has no default view control type.
-
createConverter
protected IConverter createConverter()
Description copied from class:AbstractDouiDataType
Creates the converter instance that will be used by this data type.- Overrides:
createConverter
in classAbstractDouiDataType
- Returns:
- the converter instance.
-
getValueClass
public Class<? extends HtmlDataType.Data> getValueClass()
Description copied from interface:IDouiDataType
Returns the value class for data of this type.- Specified by:
getValueClass
in interfaceIDouiDataType
- Overrides:
getValueClass
in classStringDataType
- Returns:
- the value class for data of this type.
-
isComplexDataType
public boolean isComplexDataType()
Description copied from interface:IDouiDataType
Returns true if when value is a complex data type. The xml representation of the value when not null should have attributes or sub-nodes.- Specified by:
isComplexDataType
in interfaceIDouiDataType
- Overrides:
isComplexDataType
in classAbstractDouiDataType
- Returns:
-
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
- Overrides:
getDocumentTypeFieldTemplates
in classAbstractSourceFieldDataType
- 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)
-
preDelete
public void preDelete(ISourceField field, SourcePreDeleteDataEvent event) throws PortalException
Description copied from interface:ISourceFieldDataType
Method called by default for each source field before data is deleted.- Parameters:
field
- the field that is triggering this call.event
- the event that contains information about the delete operation.- Throws:
PortalException
- See Also:
ISourceField#preDelete(ISourcePreDeleteDataEvent)
-
postAdd
public void postAdd(ISourceField field, SourcePostAddDataEvent event) throws PortalException
Description copied from interface:ISourceFieldDataType
Method called by default for each source field after data is added.- Parameters:
field
- the field that is triggering this call.event
- the event that contains information about the add operation.- Throws:
PortalException
- See Also:
ISourceField#postAdd(ISourcePostAddDataEvent)
-
preUpdate
public void preUpdate(ISourceField field, SourcePreUpdateDataEvent event) throws PortalException
Description copied from interface:ISourceFieldDataType
Method called by default for each source field before data is updated.- Parameters:
field
- the field that is triggering this call.event
- the event that contains information about the update operation.- Throws:
PortalException
- See Also:
ISourceField#preUpdate(ISourcePreUpdateDataEvent)
-
preAdd
public void preAdd(ISourceField field, SourcePreAddDataEvent event) throws PortalException
Description copied from interface:ISourceFieldDataType
Method called by default for each source field before data is added.- Parameters:
field
- the field that is triggering this call.event
- the event that contains information about the add operation.- Throws:
PortalException
- See Also:
ISourceField#preAdd(ISourcePreAddDataEvent)
-
-