Class AbstractPlugin<T extends Module>

java.lang.Object
net.shibboleth.profile.plugin.AbstractPlugin<T>
Type Parameters:
T - What sort of module this could implement
All Implemented Interfaces:
Plugin<T>
Direct Known Subclasses:
PropertyDrivenPlugin

public abstract class AbstractPlugin<T extends Module> extends Object implements Plugin<T>
A base class implementing Plugin that defaults common settings.
Since:
9.0.0
  • Field Details

    • enableModules

      @Nonnull private Set<T extends Module> enableModules
      Modules to enable on install.
    • disableModules

      @Nonnull private Set<T extends Module> disableModules
      Modules to disable on removal.
  • Constructor Details

    • AbstractPlugin

      public AbstractPlugin()
      Constructor.
  • Method Details

    • getPluginId

      @Nonnull @NotEmpty public String getPluginId()
      Return the unique identifier for the plugin. This name MUST be
      • renderable in all file systems (for instance alphanumerics, '-' and '.' only)
      • unique. This is best done using java module guidance
      For instance org.example.plugins.myplugin
      Specified by:
      getPluginId in interface Plugin<T extends Module>
      Returns:
      The id of this plugin.
    • getPatchVersion

      @Nonnegative public int getPatchVersion()
      Return The patch version, (as defined by the Java Product Version Policy.
      Specified by:
      getPatchVersion in interface Plugin<T extends Module>
      Returns:
      The patch version.
    • getRequiredModules

      @Nonnull @Unmodifiable @NotLive public Set<String> getRequiredModules()
      Get the IDs of any Modules required for installation of this plugin.
      Specified by:
      getRequiredModules in interface Plugin<T extends Module>
      Returns:
      module IDs that are required
    • getEnableOnInstall

      @Nonnull @Unmodifiable @NotLive public Set<T> getEnableOnInstall()
      Get the modules to enable after plugin installation or upgrade.
      Specified by:
      getEnableOnInstall in interface Plugin<T extends Module>
      Returns:
      modules to enable
    • getLicenseFileLocation

      public String getLicenseFileLocation()
      Return the classpath location of the license file to emit when --license is specified.
      Specified by:
      getLicenseFileLocation in interface Plugin<T extends Module>
      Returns:
      the location
    • setEnableOnInstall

      protected void setEnableOnInstall(@Nonnull Set<T> modules)
      Set the modules to enable on install.
      Parameters:
      modules - modules to enable
    • getDisableOnRemoval

      @Nonnull @Unmodifiable @NotLive public Set<T> getDisableOnRemoval()
      Get the modules to disable after plugin removal.
      Specified by:
      getDisableOnRemoval in interface Plugin<T extends Module>
      Returns:
      modules to disable
    • setDisableOnRemoval

      protected void setDisableOnRemoval(@Nonnull Set<T> modules)
      Set the modules to disable on removal.
      Parameters:
      modules - modules to disable
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object