net.sf.okapi.common

## Interface IParametersProvider

-     public interface IParametersProvider

  Common way to get access to the parameters of a given component.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IParameters` | `createParameters(java.lang.String location)` Gets the default parameters for a given provider.
    `boolean` | `deleteParameters(java.lang.String location)` Deletes a parameters object at a given location.
    `java.lang.String[]` | `getParametersList()` Gets the list of available sets of parameters (for example, the list of all filter settings).
    `IParameters` | `load(java.lang.String location)` Loads a parameters object from a given location.
    `void` | `save(java.lang.String location, IParameters paramsObject)` Saves a parameters object to a given location.
    `java.lang.String[]` | `splitLocation(java.lang.String location)` Split a given location into its components.

- - ### Method Detail

    - #### load

          IParameters load(java.lang.String location)
                           throws java.lang.Exception

      Loads a parameters object from a given location.
      Parameters:
        `location` - the string that encodes the source location. The value depends on each implementation. It can be a path, a filter setting string, etc.
      Returns:
        the loaded parameters object or null if an error occurred.
      Throws:
        `java.lang.Exception`

    - #### createParameters

          IParameters createParameters(java.lang.String location)
                                       throws java.lang.Exception

      Gets the default parameters for a given provider.
      Parameters:
        `location` - the string that encodes the source location. The value depends on each implementation. It can be a path, a filter setting string, etc.
      Returns:
        the defaults parameters object or null if an error occurred.
      Throws:
        `java.lang.Exception`

    - #### save

          void save(java.lang.String location,
                  IParameters paramsObject)
                    throws java.lang.Exception

      Saves a parameters object to a given location.
      Parameters:
        `location` - the string that encodes the target location. The value depends on each implementation. It can be a path, a filter setting string, etc.
        `paramsObject` - the parameters object to save.
      Throws:
        `java.lang.Exception`

    - #### deleteParameters

          boolean deleteParameters(java.lang.String location)

      Deletes a parameters object at a given location.
      Parameters:
        `location` - the string that encodes the target location. The value depends on each implementation. It can be a path, a filter setting string, etc.
      Returns:
        true if the parameters object was delete, false if it was not.

    - #### splitLocation

          java.lang.String[] splitLocation(java.lang.String location)

      Split a given location into its components.
      Parameters:
        `location` - the string that encodes the location. The value depends on each implementation. It can be a path, a filter setting string, etc.
      Returns:
        an array of string corresponding to each component of the location. The values depend on each implementation.

    - #### getParametersList

          java.lang.String[] getParametersList()

      Gets the list of available sets of parameters (for example, the list of all filter settings).
      Returns:
        an array of string, each string being the string you would pass to load the give set of parameters.