Class AbstractPluginOptionsFactory<T extends AbstractPluginOptions>

    • Constructor Detail

      • AbstractPluginOptionsFactory

        protected AbstractPluginOptionsFactory​(String pluginId)
        Creates the object with plugin ID.
        Parameters:
        pluginId - plugin id
    • Method Detail

      • getPluginId

        public final String getPluginId()
        Returns the plugin id related to this options.
        Returns:
        the plugin id related to this options
      • create

        public abstract T create​(NativeObject nativeObject,
                                 IsDefaultPlugins defaultValues)
        Creates a plugin options by a native object which is containing the options values and its defaults.
        Parameters:
        nativeObject - native object which is containing the options
        defaultValues - the defaults values for the plugin options
        Returns:
        a plugin options instance
      • loadDefaultsPluginOptions

        protected final <G extends AbstractPluginOptions> G loadDefaultsPluginOptions​(IsDefaultPlugins defaultsPlugins,
                                                                                      AbstractPluginOptionsFactory<G> factory)
        Loads the default plugin options from defaults.
        If factory, passed as argument, is null, returns null.
        Type Parameters:
        G - type of native object container
        Parameters:
        defaultsPlugins - default values to use to load the plugin options
        factory - factory to load options
        Returns:
        the defaults plugin options or new options instance if not exist. If factory is null, returns null.