Class DateField
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.AbstractField
-
- org.silverpeas.core.contribution.content.form.field.DateField
-
- All Implemented Interfaces:
Serializable
,Comparable
,Field
- Direct Known Subclasses:
DateFieldImpl
,DateRoField
public abstract class DateField extends AbstractField
A TextField stores a text value.- See Also:
Field
,FieldDisplayer
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE
The text field type name.-
Fields inherited from interface org.silverpeas.core.contribution.content.form.Field
FILE_PARAM_NAME_SUFFIX, TYPE_FILE
-
-
Constructor Summary
Constructors Constructor Description DateField()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
acceptObjectValue(Object value)
Returns true if the value hasn't a wrong type 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 language)
Returns true if the local value isn't ill formed and this field isn't read only.int
compareTo(Object o)
Compares this field with the specified field.boolean
equals(Object o)
Tests equality between this field and the specified field.Object
getObjectValue()
Returns the value of this field.String
getTypeName()
Returns the type name.String
getValue()
Returns the normalized value of this field.String
getValue(String language)
Returns the local string value of this field.int
hashCode()
boolean
isNull()
Returns true if this field is not set.abstract boolean
isReadOnly()
void
setNull()
Set to null this field.void
setObjectValue(Object value)
Set this field value.void
setValue(String value)
Set this field value from a normalized string value.void
setValue(String value, String language)
Set this field value from a local string value.-
Methods inherited from class org.silverpeas.core.contribution.content.form.AbstractField
acceptStringValue, getName, getOccurrence, getStringValue, setName, setOccurrence, setStringValue
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
The text field type name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeName
public String getTypeName()
Returns the type name.- Specified by:
getTypeName
in interfaceField
- Specified by:
getTypeName
in classAbstractField
-
isReadOnly
public abstract boolean isReadOnly()
-
getValue
public String getValue()
Description copied from interface:Field
Returns the normalized value of this field.- Specified by:
getValue
in interfaceField
- Specified by:
getValue
in classAbstractField
-
getValue
public String getValue(String language)
Description copied from interface:Field
Returns the local string value of this field.- Specified by:
getValue
in interfaceField
- Specified by:
getValue
in classAbstractField
-
setValue
public 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
- Specified by:
setValue
in classAbstractField
- Throws:
FormException
- when the field is readOnly or when the string value is ill formed.
-
setValue
public void setValue(String value, String language) throws FormException
Description copied from interface:Field
Set this field value from a local string value.- Specified by:
setValue
in interfaceField
- Specified by:
setValue
in classAbstractField
- Throws:
FormException
- when the field is readOnly or when the string value is ill formed.
-
acceptValue
public 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
- Specified by:
acceptValue
in classAbstractField
-
acceptValue
public boolean acceptValue(String value, String language)
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
- Specified by:
acceptValue
in classAbstractField
-
getObjectValue
public Object getObjectValue()
Returns the value of this field.- Specified by:
getObjectValue
in interfaceField
- Specified by:
getObjectValue
in classAbstractField
-
setObjectValue
public void setObjectValue(Object value) throws FormException
Set this field value.- Specified by:
setObjectValue
in interfaceField
- Specified by:
setObjectValue
in classAbstractField
- Throws:
FormException
- when the field is readOnly or when the value is not a String.
-
acceptObjectValue
public 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
- Specified by:
acceptObjectValue
in classAbstractField
-
isNull
public boolean isNull()
Description copied from interface:Field
Returns true if this field is not set.- Specified by:
isNull
in interfaceField
- Specified by:
isNull
in classAbstractField
-
setNull
public void setNull() throws FormException
Description copied from interface:Field
Set to null this field.- Specified by:
setNull
in interfaceField
- Specified by:
setNull
in classAbstractField
- Throws:
FormException
- when the field is mandatory or when the field is read only.
-
equals
public boolean equals(Object o)
Tests equality between this field and the specified field.
-
compareTo
public int compareTo(Object o)
Compares this field with the specified field.- Specified by:
compareTo
in interfaceComparable
- Specified by:
compareTo
in classAbstractField
-
-