lumis.doui.source.field
Class BaseSourceField

Package class diagram package BaseSourceField
java.lang.Object
  extended by lumis.doui.source.field.BaseSourceField
All Implemented Interfaces:
ISourceField
Direct Known Subclasses:
BaseTabularSourceField

@StableMinor(version="6.1",
             sinceVersion="4.0")
public abstract class BaseSourceField
extends java.lang.Object
implements ISourceField

The base implementation for a source field.

Since:
4.0.4

Field Summary
protected  IConverter converter
           
protected  ISourceFieldDataType dataType
           
protected  java.lang.Object defaultValue
           
protected  org.w3c.dom.Node definitionNode
           
protected  boolean display
           
protected  boolean doOptionLookup
           
protected  boolean externalData
           
protected  boolean getData
           
protected  java.lang.String id
           
protected  boolean introduction
           
protected  boolean keywords
           
protected  boolean localize
           
protected  java.lang.Object maximumValue
           
protected  java.lang.Object minimumValue
           
protected  java.lang.String name
           
protected  boolean parentId
           
protected  java.lang.String pattern
           
protected  boolean primaryName
           
protected  boolean readOnly
           
protected  boolean required
           
protected  boolean requiredWhenVisible
           
protected  Source source
           
 
Constructor Summary
BaseSourceField()
           
 
Method Summary
protected  java.lang.Object convertToFieldValueClass(java.lang.Object value, java.util.Locale locale, java.lang.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()
           
 org.w3c.dom.Node getDefaultControlDefinition()
          Returns the default control definition to be used for this field.
 org.w3c.dom.Node getDefaultInputControlDefinition()
          Returns the default input control definition to be used for editing this field's value.
 java.lang.Object getDefaultValue()
           
 org.w3c.dom.Node getDefaultViewControlDefinition()
          Returns the default control definition to be used for viewing this field's value.
 org.w3c.dom.Node getDefinitionNode()
           
 java.lang.String getId()
           
 java.lang.Object getMaximumValue()
           
 java.lang.Object getMinimumValue()
           
 java.lang.String getName()
           
 java.lang.Class<?> getValueClass()
          Returns the class this field's possible values are assignable to.
 void init(Source source, org.w3c.dom.Node fieldNode)
          Initializes this source field.
 boolean isDisplay()
           
 boolean isExternalData()
           
 boolean isGetData()
           
 boolean isIntroduction()
           
 boolean isKeywords()
           
 boolean isLocalize()
           
 boolean isParentId()
           
 boolean isPrimaryName()
           
 boolean isReadOnly()
          Returns true if this field is read-only and should not be rendered editable.
 boolean isRequired()
           
 boolean isRequiredWhenVisible()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected Source source

definitionNode

protected org.w3c.dom.Node definitionNode

id

protected java.lang.String id

name

protected java.lang.String name

primaryName

protected boolean primaryName

introduction

protected boolean introduction

keywords

protected boolean keywords

display

protected boolean display

externalData

protected boolean externalData

getData

protected boolean getData

required

protected boolean required

requiredWhenVisible

protected boolean requiredWhenVisible

parentId

protected boolean parentId

doOptionLookup

protected boolean doOptionLookup

readOnly

protected boolean readOnly

dataType

protected ISourceFieldDataType dataType

defaultValue

protected java.lang.Object defaultValue

pattern

protected java.lang.String pattern

converter

protected IConverter converter

minimumValue

protected java.lang.Object minimumValue

maximumValue

protected java.lang.Object maximumValue

localize

protected boolean localize
Constructor Detail

BaseSourceField

public BaseSourceField()
Method Detail

isIntroduction

public boolean isIntroduction()
Specified by:
isIntroduction in interface ISourceField

isKeywords

public boolean isKeywords()
Specified by:
isKeywords in interface ISourceField

getDataType

public ISourceFieldDataType getDataType()
Specified by:
getDataType in interface ISourceField

getId

public java.lang.String getId()
Specified by:
getId in interface ISourceField

getName

public java.lang.String getName()
Specified by:
getName in interface ISourceField

isDisplay

public boolean isDisplay()
Specified by:
isDisplay in interface ISourceField

isLocalize

public boolean isLocalize()

isPrimaryName

public boolean isPrimaryName()
Specified by:
isPrimaryName in interface ISourceField

isExternalData

public boolean isExternalData()
Specified by:
isExternalData in interface ISourceField

isGetData

public boolean isGetData()
Specified by:
isGetData in interface ISourceField

isRequired

public boolean isRequired()
Specified by:
isRequired in interface ISourceField

isRequiredWhenVisible

public boolean isRequiredWhenVisible()
Specified by:
isRequiredWhenVisible in interface ISourceField

isParentId

public boolean isParentId()
Specified by:
isParentId in interface ISourceField

isReadOnly

public boolean isReadOnly()
Description copied from interface: ISourceField
Returns true if this field is read-only and should not be rendered editable.

Specified by:
isReadOnly in interface ISourceField
Returns:
true if this field is read-only, false otherwise.

getDefaultValue

public java.lang.Object getDefaultValue()
Specified by:
getDefaultValue in interface ISourceField

getDefinitionNode

public org.w3c.dom.Node getDefinitionNode()
Specified by:
getDefinitionNode in interface ISourceField
Returns:
the field's definition node.

getMinimumValue

public java.lang.Object getMinimumValue()
Specified by:
getMinimumValue in interface ISourceField

getMaximumValue

public java.lang.Object getMaximumValue()
Specified by:
getMaximumValue in interface ISourceField

init

public void init(Source source,
                 org.w3c.dom.Node fieldNode)
          throws PortalException
Description copied from interface: ISourceField
Initializes this source field. This method is called by the source after the field is created and before it is used. The implementation of this method must initialize all of this instance's attributes.

Specified by:
init in interface ISourceField
Parameters:
source - the source this field will belong to.
fieldNode - the xml node that contains this field's definition.
Throws:
PortalException - if this field could not be initialized.

createDataType

protected ISourceFieldDataType createDataType()
                                       throws PortalException
Factory method that creates a data type instance for this field. This method is called during init(Source, Node).

Returns:
the data type instance created.
Throws:
PortalException
Since:
4.0.4

createConverter

protected IConverter createConverter()
                              throws PortalException
Factory method that creates a converter instance for this field. This method is called during init(Source, Node).

Returns:
the converter instance created.
Throws:
PortalException
Since:
4.0.4

getConverter

public IConverter getConverter()
Description copied from interface: ISourceField
Returns the default converter for this field's values.

Specified by:
getConverter in interface ISourceField
Returns:
the default converter for this field's values.

convertToFieldValueClass

protected java.lang.Object convertToFieldValueClass(java.lang.Object value,
                                                    java.util.Locale locale,
                                                    java.lang.String pattern)
                                             throws PortalException
Converts the given object to the this field's value class.

Parameters:
value - the object to be converted.
locale - the locale to be used in conversion.
pattern - the pattern to be used in conversion.
Returns:
the converted value.
Throws:
PortalException
Since:
4.0.10
See Also:
#getValueClass()}

getValueClass

public java.lang.Class<?> getValueClass()
Returns the class this field's possible values are assignable to.

This base implemetation defaults to this field's data type value class.

Specified by:
getValueClass in interface ISourceField
Returns:
the class this field's possible values are assignable to.
Since:
4.0.4
See Also:
IDouiDataType.getValueClass()

getDefaultControlDefinition

public org.w3c.dom.Node getDefaultControlDefinition()
                                             throws PortalException
Description copied from interface: ISourceField
Returns the default control definition to be used for this field.

Specified by:
getDefaultControlDefinition in interface ISourceField
Returns:
the control definition node.
Throws:
PortalException
See Also:
ISourceField.getDefaultInputControlDefinition(), ISourceField.getDefaultViewControlDefinition()

getDefaultInputControlDefinition

public org.w3c.dom.Node getDefaultInputControlDefinition()
                                                  throws PortalException
Description copied from interface: ISourceField
Returns the default input control definition to be used for editing this field's value.

Specified by:
getDefaultInputControlDefinition in interface ISourceField
Returns:
the control definition node.
Throws:
PortalException
See Also:
ISourceField.getDefaultControlDefinition(), ISourceField.getDefaultViewControlDefinition()

getDefaultViewControlDefinition

public org.w3c.dom.Node getDefaultViewControlDefinition()
                                                 throws PortalException
Description copied from interface: ISourceField
Returns the default control definition to be used for viewing this field's value.

Specified by:
getDefaultViewControlDefinition in interface ISourceField
Returns:
the control definition node.
Throws:
PortalException
See Also:
ISourceField.getDefaultInputControlDefinition(), ISourceField.getDefaultControlDefinition()


Lumisportal  6.1.0.111014 - Copyright © 2001-2007, Lumis. All Rights Reserved.