Class TypeManager
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.TypeManager
-
public class TypeManager extends Object
The TypeManager gives all the known field and displayer type- See Also:
Field
,FieldDisplayer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Field>
FieldDisplayer<T>getDisplayer(String typeName, String displayerName)
Returns the named FieldDisplayer of the named field.String
getDisplayerName(String typeName)
Returns the name of the default FieldDisplayer of the named type.String[]
getDisplayerNames(String typeName)
Returns the names of all the FieldDisplayers which can be used with the named type.Class<? extends Field>
getFieldImplementation(String typeName)
Returns the class field implementation of the named type.static TypeManager
getInstance()
String[]
getTypeNames()
Returns all the type names.Map<String,List<String>>
getTypesAndDisplayers()
void
setDisplayer(String displayerClassName, String typeName, String displayerName, boolean defaultDisplayer)
Set the FieldDisplayer class for typeName, displayerNamevoid
setFieldImplementation(String fieldClassName, String typeName)
Set the implementation class for typeName.
-
-
-
Method Detail
-
getInstance
public static TypeManager getInstance()
-
getTypeNames
public String[] getTypeNames()
Returns all the type names.
-
getFieldImplementation
public Class<? extends Field> getFieldImplementation(String typeName) throws FormException
Returns the class field implementation of the named type.- Throws:
FormException
- if the type name is unknown.
-
getDisplayerName
public String getDisplayerName(String typeName) throws FormException
Returns the name of the default FieldDisplayer of the named type.- Throws:
FormException
- if the type name is unknown.
-
getDisplayerNames
public String[] getDisplayerNames(String typeName) throws FormException
Returns the names of all the FieldDisplayers which can be used with the named type.- Throws:
FormException
- if the type name is unknown.
-
getDisplayer
public <T extends Field> FieldDisplayer<T> getDisplayer(String typeName, String displayerName) throws FormException
Returns the named FieldDisplayer of the named field.- Throws:
FormException
- if the type name is unknown, if the displayer name is unknown or if the displayer and the type are not compatible.
-
setFieldImplementation
public void setFieldImplementation(String fieldClassName, String typeName) throws FormException
Set the implementation class for typeName.- Throws:
FormException
-
setDisplayer
public void setDisplayer(String displayerClassName, String typeName, String displayerName, boolean defaultDisplayer) throws FormException
Set the FieldDisplayer class for typeName, displayerName- Throws:
FormException
-
-