Package net.shibboleth.profile.plugin

# 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

## Nested Class Summary

## Nested classes/interfaces inherited from interface net.shibboleth.profile.plugin.Plugin

`Plugin.Package`

## Field Summary

Fields
Modifier and Type
Field
Description
`private Set<T>`
`disableModules`
Modules to disable on removal.
`private Set<T>`
`enableModules`
Modules to enable on install.
`private List<Plugin.Package>`
`packages`
Packages to unpack.

## Constructor Summary

Constructors
Constructor
Description
`AbstractPlugin()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`Set<T>`
`getDisableOnRemoval()`
Get the modules to disable after plugin removal.
`Set<T>`
`getEnableOnInstall()`
Get the modules to enable after plugin installation or upgrade.
`String`
`getLicenseFileLocation()`
Return the classpath location of the license file to emit when --license is specified.
`Collection<Plugin.Package>`
`getPackages()`
Get the things to explicitly install.
`int`
`getPatchVersion()`
Return The patch version, (as defined by the Java Product Version Policy.
`String`
`getPluginId()`
Return the unique identifier for the plugin.
`Set<String>`
`getRequiredModules()`
Get the IDs of any `Module`s required for installation of this plugin.
`int`
`hashCode()`
`protected void`
`setDisableOnRemoval(Set<T> modules)`
Set the modules to disable on removal.
`protected void`
`setEnableOnInstall(Set<T> modules)`
Set the modules to enable on install.
`void`
`setPackages(Collection<Plugin.Package> input)`
Set the packages to transfer
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface net.shibboleth.profile.plugin.Plugin

`getMajorVersion, getMinorVersion, getModuleInfoSources, getUpdateURLs`

## 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.

### packages

@Nonnull private List<Plugin.Package> packages
Packages to unpack.

## 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 `Module`s 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

### getPackages

@Nonnull public Collection<Plugin.Package> getPackages()
Get the things to explicitly install.

Specified by:
  `getPackages` in interface `Plugin<T extends Module>`
Returns:
  what to install

### setPackages

public void setPackages(@Nonnull Collection<Plugin.Package> input)
Set the packages to transfer

Parameters:
  `input` - what to set

### 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`