com.silverpeas.form
Interface Field

All Superinterfaces:
Comparable, Serializable
All Known Implementing Classes:
AbstractField, AccessPathField, DateField, DateFieldImpl, DateRoField, ExplorerField, FileField, GroupField, JdbcField, JdbcRefField, LdapField, MultipleUserField, PdcField, PdcUserField, SequenceField, TextField, TextFieldImpl, TextRoField, UserField

public interface Field
extends Serializable, Comparable

A Field is an item of a DataRecord. The fields of a record may have different types, but they are all managed via this interface. To be displayed in a jsp page a field must be handled by a specific FieldDisplayer which is aware of the internal data type and format of the field. The links between Fields and FieldDisplayers are managed by a RecordTemplate.

See Also:
DataRecord, FieldDisplayer, RecordTemplate

Field Summary
static String FILE_PARAM_NAME_SUFFIX
           
static String TYPE_FILE
           
 
Method Summary
 boolean acceptObjectValue(Object value)
          Returns true if the value hasn't a wrong type and this field isn't read only.
 boolean acceptStringValue(String value)
          Returns true if the value isn't normalized and this field isn't read only.
 boolean acceptValue(String value)
          Returns true if the value isn't ill formed and this field isn't read only.
 boolean acceptValue(String value, String lang)
          Returns true if the local value isn't ill formed and this field isn't read only.
 String getName()
           
 Object getObjectValue()
          Returns the value of this field.
 int getOccurrence()
           
 String getStringValue()
          Returns the normalized String value.
 String getTypeName()
          Returns the type name of this field.
 String getValue()
          Returns the normalized value of this field.
 String getValue(String lang)
          Returns the local string value of this field.
 boolean isNull()
          Returns true if this field is not set.
 void setName(String name)
           
 void setNull()
          Set to null this field.
 void setObjectValue(Object value)
          Set this field value.
 void setOccurrence(int i)
           
 void setStringValue(String value)
          Set this field value from a normalized String value.
 void setValue(String value)
          Set this field value from a normalized string value.
 void setValue(String value, String lang)
          Set this field value from a local string value.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

TYPE_FILE

static final String TYPE_FILE
See Also:
Constant Field Values

FILE_PARAM_NAME_SUFFIX

static final String FILE_PARAM_NAME_SUFFIX
See Also:
Constant Field Values
Method Detail

getTypeName

String getTypeName()
Returns the type name of this field.


getValue

String getValue()
Returns the normalized value of this field.


setValue

void setValue(String value)
              throws FormException
Set this field value from a normalized string value.

Throws:
FormException

acceptValue

boolean acceptValue(String value)
Returns true if the value isn't ill formed and this field isn't read only.


getValue

String getValue(String lang)
Returns the local string value of this field.


setValue

void setValue(String value,
              String lang)
              throws FormException
Set this field value from a local string value.

Throws:
FormException

acceptValue

boolean acceptValue(String value,
                    String lang)
Returns true if the local value isn't ill formed and this field isn't read only.


getStringValue

String getStringValue()
Returns the normalized String value.


setStringValue

void setStringValue(String value)
                    throws FormException
Set this field value from a normalized String value.

Throws:
FormException

acceptStringValue

boolean acceptStringValue(String value)
Returns true if the value isn't normalized and this field isn't read only.


getObjectValue

Object getObjectValue()
Returns the value of this field.


setObjectValue

void setObjectValue(Object value)
                    throws FormException
Set this field value.

Throws:
FormException

acceptObjectValue

boolean acceptObjectValue(Object value)
Returns true if the value hasn't a wrong type and this field isn't read only.


isNull

boolean isNull()
Returns true if this field is not set.


setNull

void setNull()
             throws FormException
Set to null this field.

Throws:
FormException

getOccurrence

int getOccurrence()

setOccurrence

void setOccurrence(int i)

setName

void setName(String name)

getName

String getName()


Copyright © 2016 Silverpeas. All Rights Reserved.