net.sf.okapi.common

## 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 Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDescriptionProvider(ClassInfo descriptionProviderClass, java.lang.String parametersClassName)` Adds a new editor description provider mapping to this mapper.
    `void` | `addDescriptionProvider(java.lang.String descriptionProviderClassName, java.lang.String parametersClassName)` Adds a new editor description provider mapping to this mapper.
    `void` | `addEditor(ClassInfo editorClass, java.lang.String parametersClassName)` Adds a new parameters editor mapping to this mapper.
    `void` | `addEditor(java.lang.String editorClassName, java.lang.String parametersClassName)` Adds a new parameters editor mapping to this mapper.
    `void` | `clearDescriptionProviders()` Removes all editor mappings for this mapper.
    `void` | `clearEditors()` Removes all editor mappings for this mapper.
    `IParametersEditor` | `createParametersEditor(java.lang.String parametersClassName)` Creates an instance of the parameters editor for a given parameters class name.
    `IEditorDescriptionProvider` | `getDescriptionProvider(java.lang.String parametersClassName)` Gets an object that can provide the UI description to use with a generic editor.
    `void` | `removeDescriptionProvider(java.lang.String className)` Removes a given editor description provider from this mapper.
    `void` | `removeEditor(java.lang.String className)` Removes a given editor from this mapper.

- - ### Method Detail

    - #### addEditor

          void addEditor(ClassInfo editorClass,
                         java.lang.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(java.lang.String editorClassName,
                         java.lang.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(java.lang.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,
                                      java.lang.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(java.lang.String descriptionProviderClassName,
                                      java.lang.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(java.lang.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(java.lang.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(java.lang.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.