Class TypeManager


  • public class TypeManager
    extends Object
    The TypeManager gives all the known field and displayer type
    See Also:
    Field, FieldDisplayer
    • 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 FieldFieldDisplayer<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