Interface ConfigurationHandler


  • @ConsumerType
    public interface ConfigurationHandler
    A configuration handler allows to hook into the processing of configurations for the webconsole plugin. A handler can decide to hide configurations and properties but also implement additional validation. All configuration handlers are called in no particular order.
    • Method Detail

      • createFactoryConfiguration

        void createFactoryConfiguration​(String factoryPid,
                                        String name)
                                 throws ValidationException,
                                        IOException
        A new factory configuration with that pid should be created
        Parameters:
        factoryPid - The factory pid
        name - Optional name, might be null if unknown
        Throws:
        IOException - For an error
        ValidationException - if creation is not allowed
      • listConfiguration

        default boolean listConfiguration​(String factoryPid,
                                          String pid)
                                   throws IOException
        A configuration should be listed
        Parameters:
        factoryPid - Optional factory pid
        pid - The pid
        Returns:
        true if the configuration may be listed
        Throws:
        IOException - For an error
        Since:
        1.1
      • filterProperties

        default void filterProperties​(String factoryPid,
                                      String pid,
                                      Collection<String> propertyNames)
                               throws IOException
        Filter the properties do be displayed. Properties that should be hidden can be removed from the passed in collection
        Parameters:
        factoryPid - Optional factory pid
        pid - The pid
        propertyNames - The mutable collection of property names
        Throws:
        IOException - For an error
        Since:
        1.1