Interface IParametersProvider


  • public interface IParametersProvider
    Common way to get access to the parameters of a given component.
    • Method Detail

      • load

        IParameters load​(String location)
                  throws 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:
        Exception - if we encounter any problem loading the parameters.
      • createParameters

        IParameters createParameters​(String location)
                              throws 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:
        Exception - if we encounter any problem creating the parameters.
      • save

        void save​(String location,
                  IParameters paramsObject)
           throws 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:
        Exception - if we encounter any problem saving the parameters.
      • deleteParameters

        boolean deleteParameters​(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

        String[] splitLocation​(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

        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.