@StableMinor(version="12.4", sinceVersion="4.0") public abstract class BaseSourceField extends Object implements ISourceField
Modifier and Type | Field and Description |
---|---|
protected IConverter |
converter |
protected ISourceFieldDataType |
dataType |
protected Object |
defaultValue |
protected Node |
definitionNode |
protected boolean |
display |
protected boolean |
doOptionLookup |
protected boolean |
externalData |
protected boolean |
getData |
protected String |
id |
protected boolean |
introduction |
protected boolean |
keywords |
protected boolean |
localize |
protected Object |
maximumValue |
protected Object |
minimumValue |
protected String |
name |
protected boolean |
parentId |
protected String |
pattern |
protected boolean |
primaryName |
protected boolean |
readOnly |
protected boolean |
required |
protected boolean |
requiredWhenVisible |
protected boolean |
searchable
Indicates whether this field included to be found in a simple search (search without specifying a field).
|
protected Source<?> |
source |
Constructor and Description |
---|
BaseSourceField() |
Modifier and Type | Method and Description |
---|---|
void |
addDocumentFields(Document document,
ISourceData data)
Adds document fields values relative to this field to a document.
|
void |
addDocumentTypeFields(IDocumentTypeBuilder<?> documentTypeBuilder)
Adds document type fields relative to this field to a document type.
|
protected Object |
convertToFieldValueClass(Object value,
Locale locale,
String pattern)
Converts the given object to the this field's value class.
|
protected IConverter |
createConverter()
Factory method that creates a converter instance for this field.
|
protected ISourceFieldDataType |
createDataType()
Factory method that creates a data type instance for this field.
|
IConverter |
getConverter()
Returns the default converter for this field's values.
|
ISourceFieldDataType |
getDataType() |
Node |
getDefaultControlDefinition()
Returns the default control definition to be used for this field.
|
Node |
getDefaultInputControlDefinition()
Returns the default input control definition to be used for editing this field's value.
|
Object |
getDefaultValue() |
Node |
getDefaultViewControlDefinition()
Returns the default control definition to be used for viewing this field's value.
|
Node |
getDefinitionNode() |
protected String |
getDocumentFieldBaseId()
Returns the base identifier to use for values of this field in a big data document.
|
String |
getId() |
Object |
getMaximumValue() |
Object |
getMinimumValue() |
String |
getName() |
Class<?> |
getValueClass()
Returns the class this field's possible values are assignable to.
|
void |
init(Source<?> source,
Node fieldNode)
Initializes this source field.
|
protected boolean |
isBigDataEnabled()
Returns if big data feature is enabled for this field.
|
boolean |
isDisplay() |
boolean |
isExternalData() |
boolean |
isGetData() |
boolean |
isIntroduction() |
boolean |
isIntroductionImage()
Returns whether this field is the introduction image of the corresponding data.
|
boolean |
isKeywords() |
boolean |
isLocalize() |
boolean |
isParentId() |
boolean |
isPrimaryName() |
boolean |
isPublishStartDate()
Returns whether this field is the publish start date of the corresponding data.
|
boolean |
isReadOnly()
Returns true if this field is read-only and should not be rendered
editable.
|
boolean |
isRequired() |
boolean |
isRequiredWhenVisible() |
boolean |
isSearchable()
Returns whether this field included to be found in a simple search (search without specifying a field).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
postAdd, postDelete, postUpdate, preAdd, preDelete, preUpdate
protected Source<?> source
protected Node definitionNode
protected String id
protected String name
protected boolean primaryName
protected boolean introduction
protected boolean keywords
protected boolean display
protected boolean externalData
protected boolean getData
protected boolean required
protected boolean requiredWhenVisible
protected boolean parentId
protected boolean doOptionLookup
protected boolean readOnly
protected ISourceFieldDataType dataType
protected Object defaultValue
protected String pattern
protected IConverter converter
protected Object minimumValue
protected Object maximumValue
protected boolean localize
protected boolean searchable
public boolean isIntroduction()
isIntroduction
in interface ISourceField
public boolean isIntroductionImage()
ISourceField
isIntroductionImage
in interface ISourceField
true
if this field is the introduction image, false
otherwise.public boolean isPublishStartDate()
ISourceField
isPublishStartDate
in interface ISourceField
true
if this field is the publish start date, false
otherwise.public boolean isKeywords()
isKeywords
in interface ISourceField
public ISourceFieldDataType getDataType()
getDataType
in interface ISourceField
public String getId()
getId
in interface ISourceField
public String getName()
getName
in interface ISourceField
public boolean isDisplay()
isDisplay
in interface ISourceField
public boolean isLocalize()
public boolean isPrimaryName()
isPrimaryName
in interface ISourceField
public boolean isExternalData()
isExternalData
in interface ISourceField
public boolean isGetData()
isGetData
in interface ISourceField
public boolean isRequired()
isRequired
in interface ISourceField
public boolean isRequiredWhenVisible()
isRequiredWhenVisible
in interface ISourceField
public boolean isParentId()
isParentId
in interface ISourceField
public boolean isReadOnly()
ISourceField
isReadOnly
in interface ISourceField
public Object getDefaultValue()
getDefaultValue
in interface ISourceField
public Node getDefinitionNode()
getDefinitionNode
in interface ISourceField
public Object getMinimumValue()
getMinimumValue
in interface ISourceField
public Object getMaximumValue()
getMaximumValue
in interface ISourceField
public boolean isSearchable()
ISourceField
isSearchable
in interface ISourceField
true
if this field is included in simple search, false
otherwise.public void init(Source<?> source, Node fieldNode) throws PortalException
ISourceField
init
in interface ISourceField
source
- the source this field will belong to.fieldNode
- the xml node that contains this field's definition.PortalException
- if this field could not be initialized.protected ISourceFieldDataType createDataType() throws PortalException
init(Source, Node)
.PortalException
protected IConverter createConverter() throws PortalException
init(Source, Node)
.PortalException
public IConverter getConverter()
ISourceField
getConverter
in interface ISourceField
protected Object convertToFieldValueClass(Object value, Locale locale, String pattern) throws PortalException
value
- the object to be converted.locale
- the locale to be used in conversion.pattern
- the pattern to be used in conversion.PortalException
#getValueClass()}
public Class<?> getValueClass()
This base implemetation defaults to this field's data type value class.
getValueClass
in interface ISourceField
IDouiDataType.getValueClass()
public Node getDefaultControlDefinition() throws PortalException
ISourceField
getDefaultControlDefinition
in interface ISourceField
PortalException
ISourceField.getDefaultInputControlDefinition()
,
ISourceField.getDefaultViewControlDefinition()
public Node getDefaultInputControlDefinition() throws PortalException
ISourceField
getDefaultInputControlDefinition
in interface ISourceField
PortalException
ISourceField.getDefaultControlDefinition()
,
ISourceField.getDefaultViewControlDefinition()
public Node getDefaultViewControlDefinition() throws PortalException
ISourceField
getDefaultViewControlDefinition
in interface ISourceField
PortalException
ISourceField.getDefaultInputControlDefinition()
,
ISourceField.getDefaultControlDefinition()
protected String getDocumentFieldBaseId()
addDocumentFields(Document, ISourceData)
,
addDocumentTypeFields(IDocumentTypeBuilder)
protected boolean isBigDataEnabled()
public void addDocumentFields(Document document, ISourceData data)
ISourceField
addDocumentFields
in interface ISourceField
document
- the document.data
- the source data to be used to obtain the field value.ISourceField.addDocumentTypeFields(IDocumentTypeBuilder)
public void addDocumentTypeFields(IDocumentTypeBuilder<?> documentTypeBuilder)
ISourceField
addDocumentTypeFields
in interface ISourceField
ISourceField.addDocumentFields(Document, ISourceData)
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.