|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.form.record.GenericFieldTemplate
public class GenericFieldTemplate
A generic FieldTemplate implementation.
Constructor Summary | |
---|---|
GenericFieldTemplate()
Builds a GenericFieldTemplate |
|
GenericFieldTemplate(String fieldName,
Class fieldImpl)
Builds a GenericFieldTemplate from a field name and a field implementation. |
|
GenericFieldTemplate(String fieldName,
String typeName)
Builds a GenericFieldTemplate from a field name and a field type name. |
Method Summary | |
---|---|
void |
addLabel(String label,
String language)
Adds a local label. |
void |
addParameter(String name,
String value)
Adds a local parameter. |
GenericFieldTemplate |
clone()
|
boolean |
equals(Object obj)
|
String |
getDisplayerName()
Returns the name of the FieldDisplayer to display the described field. |
Field |
getEmptyField()
Returns an empty Field built on this template. |
Field |
getEmptyField(int occurrence)
|
String |
getFieldName()
Returns the field name of the Field built on this template. |
Map<String,String> |
getKeyValuePairs(String language)
|
String |
getLabel()
Returns the default label of the described field. |
String |
getLabel(String language)
Returns the local label of the described field. |
Map<String,String> |
getLabels()
|
List<Label> |
getLabelsObj()
Used by the castor xml mapping. |
String[] |
getLanguages()
Returns the locals |
int |
getMaximumNumberOfOccurrences()
|
String |
getParameter(String name,
String language)
Returns a local parameter of the described field. |
Map<String,String> |
getParameters(String language)
Returns a Map (String -> String) of named parameters which can be used by the displayer (max-size, length ...). |
List<Parameter> |
getParametersObj()
Used by the castor xml mapping. |
String |
getTemplateName()
|
String |
getTypeName()
Returns the type name of the described field. |
int |
hashCode()
|
boolean |
isDisabled()
Returns true when the described field must be disabled. |
boolean |
isHidden()
Returns true when the described field must be hidden. |
boolean |
isMandatory()
Returns true when the described field must have a value. |
boolean |
isReadOnly()
Returns true when the described field can't be updated. |
boolean |
isRepeatable()
|
boolean |
isSearchable()
|
boolean |
isUsedAsFacet()
|
void |
setDisabled(boolean isDisabled)
Set or unset the isDisabled flag |
void |
setDisplayerName(String displayerName)
Set the name of the FieldDisplayer. |
void |
setFieldName(String fieldName)
Set the field name of the Field built on this template. |
void |
setHidden(boolean isHidden)
Set or unset the isHidden flag |
void |
setLabel(String label)
Set the default label. |
void |
setLabelsObj(List<Label> labelsObj)
Used by the castor xml mapping. |
void |
setMandatory(boolean isMandatory)
Set or unset the isMandatory flag |
void |
setMandatory(Boolean isMandatory)
Set or unset the isMandatory flag |
void |
setMaximumNumberOfOccurrences(int nb)
|
void |
setParametersObj(List<Parameter> parametersObj)
Used by the castor xml mapping. |
void |
setReadOnly(boolean isReadOnly)
Set or unset the isReadOnly flag |
void |
setSearchable(boolean searchable)
|
void |
setTemplateName(String templateName)
|
void |
setTypeName(String typeName)
set the type name of the described field. |
void |
setUsedAsFacet(boolean usedAsFacet)
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericFieldTemplate()
public GenericFieldTemplate(String fieldName, String typeName) throws FormException
FormException
public GenericFieldTemplate(String fieldName, Class fieldImpl) throws FormException
FormException
Method Detail |
---|
public String getFieldName()
getFieldName
in interface FieldTemplate
public void setFieldName(String fieldName)
public String getTypeName()
getTypeName
in interface FieldTemplate
public void setTypeName(String typeName) throws FormException
FormException
public String getDisplayerName()
getDisplayerName
in interface FieldTemplate
public void setDisplayerName(String displayerName)
public String getLabel()
getLabel
in interface FieldTemplate
public String getLabel(String language)
getLabel
in interface FieldTemplate
public String getParameter(String name, String language)
public void setLabel(String label)
public void addLabel(String label, String language)
public void addParameter(String name, String value)
public boolean isMandatory()
isMandatory
in interface FieldTemplate
public void setMandatory(boolean isMandatory)
public void setMandatory(Boolean isMandatory)
public boolean isReadOnly()
isReadOnly
in interface FieldTemplate
public void setReadOnly(boolean isReadOnly)
public boolean isDisabled()
isDisabled
in interface FieldTemplate
public void setDisabled(boolean isDisabled)
public boolean isHidden()
isHidden
in interface FieldTemplate
public void setHidden(boolean isHidden)
public Map<String,String> getParameters(String language)
FieldTemplate
getParameters
in interface FieldTemplate
public Map<String,String> getKeyValuePairs(String language)
public Map<String,String> getLabels()
public Field getEmptyField() throws FormException
getEmptyField
in interface FieldTemplate
FormException
public Field getEmptyField(int occurrence) throws FormException
getEmptyField
in interface FieldTemplate
FormException
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String[] getLanguages()
FieldTemplate
getLanguages
in interface FieldTemplate
public List<Label> getLabelsObj()
public void setLabelsObj(List<Label> labelsObj)
public List<Parameter> getParametersObj()
getParametersObj
in interface FieldTemplate
public void setParametersObj(List<Parameter> parametersObj)
public boolean isSearchable()
isSearchable
in interface FieldTemplate
public void setSearchable(boolean searchable)
public String getTemplateName()
getTemplateName
in interface FieldTemplate
public void setTemplateName(String templateName)
public boolean isUsedAsFacet()
isUsedAsFacet
in interface FieldTemplate
public void setUsedAsFacet(boolean usedAsFacet)
public GenericFieldTemplate clone()
clone
in class Object
public int getMaximumNumberOfOccurrences()
getMaximumNumberOfOccurrences
in interface FieldTemplate
public void setMaximumNumberOfOccurrences(int nb)
public boolean isRepeatable()
isRepeatable
in interface FieldTemplate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |