com.silverpeas.form
Class AbstractField

java.lang.Object
  extended by com.silverpeas.form.AbstractField
All Implemented Interfaces:
Field, Serializable, Comparable
Direct Known Subclasses:
DateField, ExplorerField, GroupField, JdbcRefField, MultipleUserField, PdcField, PdcUserField, TextField, UserField

public abstract class AbstractField
extends Object
implements Field

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.silverpeas.form.Field
FILE_PARAM_NAME_SUFFIX, TYPE_FILE
 
Constructor Summary
AbstractField()
           
 
Method Summary
abstract  boolean acceptObjectValue(Object value)
          Returns true if the value hasn't a wrong type and this field isn't read only.
abstract  boolean acceptStringValue(String value)
          Returns true if the value isn't normalized and this field isn't read only.
abstract  boolean acceptValue(String value)
          Returns true if the value isn't ill formed and this field isn't read only.
abstract  boolean acceptValue(String value, String lang)
          Returns true if the local value isn't ill formed and this field isn't read only.
abstract  int compareTo(Object o)
           
 String getName()
           
abstract  Object getObjectValue()
          Returns the value of this field.
 int getOccurrence()
           
abstract  String getStringValue()
          Returns the normalized String value.
abstract  String getTypeName()
          Returns the type name of this field.
abstract  String getValue()
          Returns the normalized value of this field.
abstract  String getValue(String lang)
          Returns the local string value of this field.
abstract  boolean isNull()
          Returns true if this field is not set.
 void setName(String name)
           
abstract  void setNull()
          Set to null this field.
abstract  void setObjectValue(Object value)
          Set this field value.
 void setOccurrence(int i)
           
abstract  void setStringValue(String value)
          Set this field value from a normalized String value.
abstract  void setValue(String value)
          Set this field value from a normalized string value.
abstract  void setValue(String value, String lang)
          Set this field value from a local string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractField

public AbstractField()
Method Detail

compareTo

public abstract int compareTo(Object o)
Specified by:
compareTo in interface Comparable

getTypeName

public abstract String getTypeName()
Description copied from interface: Field
Returns the type name of this field.

Specified by:
getTypeName in interface Field

getValue

public abstract String getValue()
Description copied from interface: Field
Returns the normalized value of this field.

Specified by:
getValue in interface Field

setValue

public abstract void setValue(String value)
                       throws FormException
Description copied from interface: Field
Set this field value from a normalized string value.

Specified by:
setValue in interface Field
Throws:
FormException

acceptValue

public abstract boolean acceptValue(String value)
Description copied from interface: Field
Returns true if the value isn't ill formed and this field isn't read only.

Specified by:
acceptValue in interface Field

getValue

public abstract String getValue(String lang)
Description copied from interface: Field
Returns the local string value of this field.

Specified by:
getValue in interface Field

setValue

public abstract void setValue(String value,
                              String lang)
                       throws FormException
Description copied from interface: Field
Set this field value from a local string value.

Specified by:
setValue in interface Field
Throws:
FormException

acceptValue

public abstract boolean acceptValue(String value,
                                    String lang)
Description copied from interface: Field
Returns true if the local value isn't ill formed and this field isn't read only.

Specified by:
acceptValue in interface Field

getStringValue

public abstract String getStringValue()
Description copied from interface: Field
Returns the normalized String value.

Specified by:
getStringValue in interface Field

setStringValue

public abstract void setStringValue(String value)
                             throws FormException
Description copied from interface: Field
Set this field value from a normalized String value.

Specified by:
setStringValue in interface Field
Throws:
FormException

acceptStringValue

public abstract boolean acceptStringValue(String value)
Description copied from interface: Field
Returns true if the value isn't normalized and this field isn't read only.

Specified by:
acceptStringValue in interface Field

getObjectValue

public abstract Object getObjectValue()
Description copied from interface: Field
Returns the value of this field.

Specified by:
getObjectValue in interface Field

setObjectValue

public abstract void setObjectValue(Object value)
                             throws FormException
Description copied from interface: Field
Set this field value.

Specified by:
setObjectValue in interface Field
Throws:
FormException

acceptObjectValue

public abstract boolean acceptObjectValue(Object value)
Description copied from interface: Field
Returns true if the value hasn't a wrong type and this field isn't read only.

Specified by:
acceptObjectValue in interface Field

isNull

public abstract boolean isNull()
Description copied from interface: Field
Returns true if this field is not set.

Specified by:
isNull in interface Field

setNull

public abstract void setNull()
                      throws FormException
Description copied from interface: Field
Set to null this field.

Specified by:
setNull in interface Field
Throws:
FormException

getOccurrence

public int getOccurrence()
Specified by:
getOccurrence in interface Field

setOccurrence

public void setOccurrence(int i)
Specified by:
setOccurrence in interface Field

setName

public void setName(String name)
Specified by:
setName in interface Field

getName

public String getName()
Specified by:
getName in interface Field


Copyright © 2016 Silverpeas. All Rights Reserved.