Class FilterConfiguration


  • public class FilterConfiguration
    extends Object
    Data set defining a filter configuration.
    • Field Detail

      • configId

        public String configId
        Unique identifier for this configuration.
      • filterClass

        public String filterClass
        The full name of the class that implement the filter for this configuration.
      • parametersLocation

        public String parametersLocation
        The location of the parameters for this configuration. This should be the name of the file where the configuration is stored in the package resource for a pre-defined configurations; it can be null if the configuration is the default one, and it can be anything for a custom configuration.
      • parameters

        public IParameters parameters
        The parameters for this configuration. It can be null if the configuration is the default one, and it can be anything for a custom configuration. This will override parametersLocation of non-null.
      • name

        public String name
        Short localizable name for this configuration.
      • description

        public String description
        Longer localizable description of for this configuration.
      • custom

        public boolean custom
        Flag indicating if this configuration is custom or pre-defined.
      • mimeType

        public String mimeType
        MIME type for this configuration.
      • classLoader

        public URLClassLoader classLoader
        Class loader to use for this filter (null to use the default).
      • extensions

        public String extensions
        List of extensions corresponding to this configuration. The list can be null. Otherwise it must be in the form: ".ext1;.ext2;" The ';' must be present even when there is only one extension. All extensions must have the '.'
    • Constructor Detail

      • FilterConfiguration

        public FilterConfiguration()
        Creates an empty FilterConfiguration object.
      • FilterConfiguration

        public FilterConfiguration​(String configId,
                                   String mimeType,
                                   String filterClass,
                                   String name,
                                   String description,
                                   String parametersLocation,
                                   String extensions)
        Creates a FilterConfiguration object and initializes it.
        Parameters:
        configId - the configuration identifier.
        mimeType - the MIME type associated with this configuration.
        filterClass - the filter class name.
        name - the localizable name of this configuration.
        description - the localizable description of this configuration.
        parametersLocation - the location where the parameters for this configuration are stored.
        extensions - the extensions for this configuration (eg. ".htm;.html;")
      • FilterConfiguration

        public FilterConfiguration​(String configId,
                                   String mimeType,
                                   String filterClass,
                                   String name,
                                   String description,
                                   String parametersLocation)
        Creates a FilterConfiguration object and initializes it.
        Parameters:
        configId - the configuration identifier.
        mimeType - the MIME type associated with this configuration.
        filterClass - the filter class name.
        name - the localizable name of this configuration.
        description - the localizable description of this configuration.
        parametersLocation - the location where the parameters for this configuration are stored.
      • FilterConfiguration

        public FilterConfiguration​(String configId,
                                   String mimeType,
                                   String filterClass,
                                   String name,
                                   String description)
        Creates a FilterConfiguration object and initializes it.
        Parameters:
        configId - the configuration identifier.
        mimeType - the MIME type associated with this configuration.
        filterClass - the filter class name.
        name - the localizable name of this configuration.
        description - the localizable description of this configuration.
      • FilterConfiguration

        public FilterConfiguration​(String configId,
                                   String mimeType,
                                   String filterClass,
                                   String name,
                                   String description,
                                   String parametersLocation,
                                   IParameters parameters,
                                   String extensions)
        Creates a FilterConfiguration object and initializes it.
        Parameters:
        configId - the configuration identifier.
        mimeType - the MIME type associated with this configuration.
        filterClass - the filter class name.
        name - the localizable name of this configuration.
        description - the localizable description of this configuration.
        parametersLocation - the location where the parameters for this configuration are stored. (use null if there are no parameters).
        parameters - custom parameter instance for this filter.
        extensions - the extensions for this configuration (eg. ".htm;.html;")
    • Method Detail

      • loadParametersFromStream

        public void loadParametersFromStream​(InputStream stream)
        Load the IParameters from the give InputStream
        Parameters:
        stream - - stream of the parameter file.