Class PdcField
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.AbstractField
-
- org.silverpeas.core.pdc.form.fieldtype.PdcField
-
- All Implemented Interfaces:
Serializable
,Comparable<Field>
,Field
public class PdcField extends AbstractField
A PDC field describes the positions of a contribution on the axis of the PdC (Plan of Classification)- Author:
- ahedin
- See Also:
PdcFieldDisplayer
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE
-
Fields inherited from interface org.silverpeas.core.contribution.content.form.Field
FILE_PARAM_NAME_SUFFIX, TYPE_FILE
-
-
Constructor Summary
Constructors Constructor Description PdcField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptObjectValue(Object value)
Is this field able to accept the specified value?boolean
acceptStringValue(String value)
Is this field able to accept the specifiedString
value?boolean
acceptValue(String value)
Is this field is able to accept the specified value?boolean
acceptValue(String value, String lang)
Is this field is able to accept the specified value in the given language?int
compareTo(Field o)
boolean
equals(Object o)
Object
getObjectValue()
Gets the value of this field.String
getStringValue()
Gets the normalizedString
value of this field.String
getTypeName()
Gets the type name of this field.String
getValue()
Gets the normalized value of this field.String
getValue(String lang)
Gets the textual value of this field in the specified language.int
hashCode()
boolean
isNull()
Is this field valued?boolean
isReadOnly()
void
setNull()
Sets to null this field.void
setObjectValue(Object value)
Sets the specified value.void
setStringValue(String value)
Sets the specifiedString
normalized value.void
setValue(String value)
Sets the specified normalized value.void
setValue(String value, String lang)
Sets the specified textual value in the given language.-
Methods inherited from class org.silverpeas.core.contribution.content.form.AbstractField
getName, getOccurrence, setName, setOccurrence
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeName
public String getTypeName()
Description copied from interface:Field
Gets the type name of this field.- Returns:
- the name of this field type.
-
acceptObjectValue
public boolean acceptObjectValue(Object value)
Description copied from interface:Field
Is this field able to accept the specified value?- Parameters:
value
- a value- Returns:
- true if the value hasn't a wrong type and this field isn't read only.
-
acceptStringValue
public boolean acceptStringValue(String value)
Description copied from interface:Field
Is this field able to accept the specifiedString
value?- Parameters:
value
- aString
value.- Returns:
- true if the value isn't normalized and this field isn't read only.
-
acceptValue
public boolean acceptValue(String value)
Description copied from interface:Field
Is this field is able to accept the specified value?- Returns:
- true if the value format is correct and this field isn't read only. False otherwise.
-
acceptValue
public boolean acceptValue(String value, String lang)
Description copied from interface:Field
Is this field is able to accept the specified value in the given language?- Parameters:
value
- a textual value.lang
- the ISO-631 code of a supported language.- Returns:
- true if the local value isn't ill formed and this field isn't read only.
-
isReadOnly
public boolean isReadOnly()
-
getObjectValue
public Object getObjectValue()
Description copied from interface:Field
Gets the value of this field.- Returns:
- an object representing the value of this field.
-
getStringValue
public String getStringValue()
Description copied from interface:Field
Gets the normalizedString
value of this field.- Returns:
- the
String
representation of the value of this field.
-
getValue
public String getValue()
Description copied from interface:Field
Gets the normalized value of this field.- Returns:
- the value of this field.
-
getValue
public String getValue(String lang)
Description copied from interface:Field
Gets the textual value of this field in the specified language.- Parameters:
lang
- the ISO-631 code of a supported language.- Returns:
- the value in the specified language.
-
isNull
public boolean isNull()
Description copied from interface:Field
Is this field valued?- Returns:
- true if this field is not set. False otherwise.
-
setNull
public void setNull()
Description copied from interface:Field
Sets to null this field.
-
setObjectValue
public void setObjectValue(Object value) throws FormException
Description copied from interface:Field
Sets the specified value.- Parameters:
value
- anObject
representing the value to set.- Throws:
FormException
- when the field is readOnly or when the value has a wrong type.
-
setStringValue
public void setStringValue(String value)
Description copied from interface:Field
Sets the specifiedString
normalized value.- Parameters:
value
- theString
value to set
-
setValue
public void setValue(String value) throws FormException
Description copied from interface:Field
Sets the specified normalized value.- Parameters:
value
- the normalized value to set.- Throws:
FormException
- when the field is readOnly or when the value format is wrong.
-
setValue
public void setValue(String value, String lang) throws FormException
Description copied from interface:Field
Sets the specified textual value in the given language.- Parameters:
value
- a textual value.lang
- the ISO-631 code of a supported language.- Throws:
FormException
- when the field is readOnly or if the value isn't a text.
-
compareTo
public int compareTo(Field o)
-
-