Interface IParametersEditorMapper

  • All Known Subinterfaces:
    IFilterConfigurationMapper
    All Known Implementing Classes:
    FilterConfigurationMapper, ParametersEditorMapper

    public interface IParametersEditorMapper
    Common set of methods to manage parameters editors and editor description providers. Editing parameters can be done by a dedicated editor or by a generic editor. This class is designed to manage these two types of class. It associates names of parameters classes to editor classes or editor description provider classes. This last type of class is used by the generic editor.
    • Method Detail

      • addEditor

        void addEditor​(ClassInfo editorClass,
                       String parametersClassName)
        Adds a new parameters editor mapping to this mapper.
        Parameters:
        editorClass - the class information of the editor to add.
        parametersClassName - the class name of the parameters this editor can edit. If this class name is already listed, the exiting entry will be replaced by this one.
      • addEditor

        void addEditor​(String editorClassName,
                       String parametersClassName)
        Adds a new parameters editor mapping to this mapper. This is the same as calling addEditor(new ClassInfo(editorClassName)).
        Parameters:
        editorClassName - the class name of the editor to add.
        parametersClassName - the class name of the parameters this editor can edit. If this class name is already listed, the exiting entry will be replaced by this one.
      • removeEditor

        void removeEditor​(String className)
        Removes a given editor from this mapper.
        Parameters:
        className - the class name of the editor to remove.
      • clearEditors

        void clearEditors()
        Removes all editor mappings for this mapper.
      • addDescriptionProvider

        void addDescriptionProvider​(ClassInfo descriptionProviderClass,
                                    String parametersClassName)
        Adds a new editor description provider mapping to this mapper.
        Parameters:
        descriptionProviderClass - the class information of the editor description provider to add.
        parametersClassName - the class name of the parameters this editor can edit. If this class name is already listed, the exiting entry will be replaced by this one.
      • addDescriptionProvider

        void addDescriptionProvider​(String descriptionProviderClassName,
                                    String parametersClassName)
        Adds a new editor description provider mapping to this mapper. This is the same as calling addDescriptionProvider(new ClassInfo(descriptionProviderClassName)).
        Parameters:
        descriptionProviderClassName - the class name of the editor description provider to add.
        parametersClassName - the class name of the parameters this editor can edit. If this class name is already listed, the exiting entry will be replaced by this one.
      • removeDescriptionProvider

        void removeDescriptionProvider​(String className)
        Removes a given editor description provider from this mapper.
        Parameters:
        className - the class name of the editor description provider to remove.
      • clearDescriptionProviders

        void clearDescriptionProviders()
        Removes all editor mappings for this mapper.
      • createParametersEditor

        IParametersEditor createParametersEditor​(String parametersClassName)
        Creates an instance of the parameters editor for a given parameters class name.
        Parameters:
        parametersClassName - the parameters class name to use for lookup.
        Returns:
        a new IParametersEditor object for the given class name, or null if no editor is available or if the object could not be created.
        Throws:
        OkapiEditorCreationException - if the editor could not be created.
      • getDescriptionProvider

        IEditorDescriptionProvider getDescriptionProvider​(String parametersClassName)
        Gets an object that can provide the UI description to use with a generic editor.
        Parameters:
        parametersClassName - the name of the class for which to get the description provider.
        Returns:
        an editor description provider or null if none is set for this class.