Package net.shibboleth.profile.plugin

# Interface Plugin<T extends Module>

Type Parameters:
  `T` - module type

All Known Implementing Classes:
  `AbstractPlugin`, `PropertyDrivenPlugin`

public interface Plugin<T extends Module>
The base interface for plugins into the IdP and SP.

Since:
  9.0.0

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static interface`
`Plugin.Package`
An abstraction for "a thing that we want to unpack into idp home (outside webapps)".

## Method Summary

Modifier and Type
Method
Description
`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.
`int`
`getMajorVersion()`
Return the major version, (as defined by the Java Product Version Policy.
`int`
`getMinorVersion()`
Return the minor version, (as defined by the Java Product Version Policy.
`default List<URL>`
`getModuleInfoSources()`
Return the places to look for information for the modules this plugin may require The format of the (property) file at this location is fixed.
`default 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.
`List<URL>`
`getUpdateURLs()`
Return the places to look for information for this plugin package.

## Method Details

### getPluginId

@Nonnull @NotEmpty 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`

Returns:
  The id of this plugin.

### getUpdateURLs

@Nonnull @Unmodifiable @NotLive List<URL> getUpdateURLs() throws IOException
Return the places to look for information for this plugin package. The format of the (property) file at this location is fixed.

Returns:
  Zero or more URLs
Throws:
  `IOException` - if the resource construction failed.

### getModuleInfoSources

@Nonnull @Unmodifiable @NotLive default List<URL> getModuleInfoSources() throws IOException
Return the places to look for information for the modules this plugin may require The format of the (property) file at this location is fixed. modules.id.plugin=PluginIdRequired modules.id.version=VersionOfPlugin

Returns:
  Zero or more URLs
Throws:
  `IOException` - if the resource construction failed.

### getMajorVersion

@Nonnegative int getMajorVersion()
Return the major version, (as defined by the Java Product Version Policy.

Returns:
  The major version.

### getMinorVersion

@Nonnegative int getMinorVersion()
Return the minor version, (as defined by the Java Product Version Policy.

Returns:
  The minor version.

### getPatchVersion

@Nonnegative int getPatchVersion()
Return The patch version, (as defined by the Java Product Version Policy.

Returns:
  The patch version.

### getLicenseFileLocation

@Nullable String getLicenseFileLocation()
Return the classpath location of the license file to emit when --license is specified.

Returns:
  the location

### getRequiredModules

@Nonnull @Unmodifiable @NotLive Set<String> getRequiredModules()
Get the IDs of any `Module`s required for installation of this plugin.

Returns:
  module IDs that are required

### getEnableOnInstall

@Nonnull @Unmodifiable @NotLive Set<T> getEnableOnInstall()
Get the modules to enable after plugin installation or upgrade.

Returns:
  modules to enable

### getDisableOnRemoval

@Nonnull @Unmodifiable @NotLive Set<T> getDisableOnRemoval()
Get the modules to disable after plugin removal.

Returns:
  modules to disable

### getPackages

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

Returns:
  what to install