Class AbstractField
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.AbstractField
-
- All Implemented Interfaces:
Serializable
,Comparable
,Field
- Direct Known Subclasses:
DateField
,ExplorerField
,GroupField
,MultipleUserField
,PdcField
,PdcUserField
,PublicationsPickerField
,TextField
,UserField
public abstract class AbstractField extends Object implements Field
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.silverpeas.core.contribution.content.form.Field
FILE_PARAM_NAME_SUFFIX, TYPE_FILE
-
-
Constructor Summary
Constructors Constructor Description AbstractField()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
compareTo
public abstract int compareTo(Object o)
- Specified by:
compareTo
in interfaceComparable
-
getTypeName
public abstract String getTypeName()
Description copied from interface:Field
Returns the type name of this field.- Specified by:
getTypeName
in interfaceField
-
getValue
public abstract String getValue()
Description copied from interface:Field
Returns the normalized value of this 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 interfaceField
- Throws:
FormException
- when the field is readOnly or when the string value is ill formed.
-
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 interfaceField
-
getValue
public abstract String getValue(String lang)
Description copied from interface:Field
Returns the local string value of this 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 interfaceField
- Throws:
FormException
- when the field is readOnly or when the string value is ill formed.
-
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 interfaceField
-
getStringValue
public abstract String getStringValue()
Description copied from interface:Field
Returns the normalized String value.- Specified by:
getStringValue
in interfaceField
-
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 interfaceField
- Throws:
FormException
- when the field is readOnly or FormException when the value is not a normalized.
-
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 interfaceField
-
getObjectValue
public abstract Object getObjectValue()
Description copied from interface:Field
Returns the value of this field.- Specified by:
getObjectValue
in interfaceField
-
setObjectValue
public abstract void setObjectValue(Object value) throws FormException
Description copied from interface:Field
Set this field value.- Specified by:
setObjectValue
in interfaceField
- Throws:
FormException
- when the field is readOnly or when the value has a wrong type.
-
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 interfaceField
-
isNull
public abstract boolean isNull()
Description copied from interface:Field
Returns true if this field is not set.
-
setNull
public abstract void setNull() throws FormException
Description copied from interface:Field
Set to null this field.- Specified by:
setNull
in interfaceField
- Throws:
FormException
- when the field is mandatory or when the field is read only.
-
getOccurrence
public int getOccurrence()
- Specified by:
getOccurrence
in interfaceField
-
setOccurrence
public void setOccurrence(int i)
- Specified by:
setOccurrence
in interfaceField
-
-