Package net.shibboleth.idp.plugin
Class PropertyDrivenIdPPlugin
java.lang.Object
net.shibboleth.idp.plugin.AbstractIdPPlugin
net.shibboleth.idp.plugin.PropertyDrivenIdPPlugin
- All Implemented Interfaces:
IdPPlugin
- Direct Known Subclasses:
FirstPartyIdPPlugin
Implementation of
IdPPlugin
relying on Java Properties
.- Since:
- 4.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Default name of plugin properties resource.private org.slf4j.Logger
Class logger.static final String
Property for plugin ID.static final String
Property for plugin license.static final String
Property for plugin's required modules.static final String
Prefix of property for plugin update URL.static final String
Property for plugin version.private String
Non-defaulted plugin ID.private final Properties
Properties describing plugin.private PluginVersion
Handles parsing of plugin version.Required modules.Plugin update URLs. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyDrivenIdPPlugin
(InputStream inputStream) Constructor.PropertyDrivenIdPPlugin
(Class<? extends IdPPlugin> claz) Constructor.PropertyDrivenIdPPlugin
(Properties properties) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionProvides default update locations to use.Return the classpath location of the license file to emit when --license is specified.int
Return the major version, (as defined by the Java Product Version Policy.int
Return the minor version, (as defined by the Java Product Version Policy.int
Return The patch version, (as defined by the Java Product Version Policy.Return the unique identifier for the plugin.Get the IDs of anyIdPModule
s required for installation of this plugin.Return the places to look for information for this plugin package.protected void
load()
Load plugin information from properties.Methods inherited from class net.shibboleth.idp.plugin.AbstractIdPPlugin
equals, getDisableOnRemoval, getEnableOnInstall, hashCode, setDisableOnRemoval, setEnableOnInstall, toString
-
Field Details
-
DEFAULT_RESOURCE
Default name of plugin properties resource.- See Also:
-
PLUGIN_ID_PROPERTY
Property for plugin ID.- See Also:
-
PLUGIN_VERSION_PROPERTY
Property for plugin version.- See Also:
-
PLUGIN_LICENSE_PROPERTY
Property for plugin license.- See Also:
-
PLUGIN_URL_PROPERTY
Prefix of property for plugin update URL.- See Also:
-
PLUGIN_REQ_MODULES_PROPERTY
Property for plugin's required modules.- See Also:
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
pluginProperties
Properties describing plugin. -
pluginId
Non-defaulted plugin ID. -
pluginVersion
Handles parsing of plugin version. -
updateURLs
Plugin update URLs. -
requiredModules
Required modules.
-
-
Constructor Details
-
PropertyDrivenIdPPlugin
public PropertyDrivenIdPPlugin(@Nonnull Class<? extends IdPPlugin> claz) throws IOException, PluginException Constructor.- Parameters:
claz
- type of object used to locate default module.properties resource- Throws:
IOException
- if unable to read filePluginException
- if the plugin is not in a valid state
-
PropertyDrivenIdPPlugin
public PropertyDrivenIdPPlugin(@Nonnull InputStream inputStream) throws IOException, PluginException Constructor.- Parameters:
inputStream
- property stream- Throws:
IOException
- if unable to read filePluginException
- if the plugin is not in a valid state
-
PropertyDrivenIdPPlugin
Constructor.- Parameters:
properties
- property set- Throws:
PluginException
- if the plugin is not in a valid state
-
-
Method Details
-
load
Load plugin information from properties.- Throws:
PluginException
- on errors
-
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
org.example.plugins.myplugin
- Specified by:
getPluginId
in interfaceIdPPlugin
- Overrides:
getPluginId
in classAbstractIdPPlugin
- Returns:
- The id of this plugin.
-
getUpdateURLs
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
-
getRequiredModules
Get the IDs of anyIdPModule
s required for installation of this plugin.- Specified by:
getRequiredModules
in interfaceIdPPlugin
- Overrides:
getRequiredModules
in classAbstractIdPPlugin
- Returns:
- module IDs that are required
-
getLicenseFileLocation
Return the classpath location of the license file to emit when --license is specified.- Specified by:
getLicenseFileLocation
in interfaceIdPPlugin
- Overrides:
getLicenseFileLocation
in classAbstractIdPPlugin
- Returns:
- the location
-
getMajorVersion
Return the major version, (as defined by the Java Product Version Policy.- Returns:
- The major version.
-
getMinorVersion
Return the minor version, (as defined by the Java Product Version Policy.- Returns:
- The minor version.
-
getPatchVersion
Return The patch version, (as defined by the Java Product Version Policy.- Specified by:
getPatchVersion
in interfaceIdPPlugin
- Overrides:
getPatchVersion
in classAbstractIdPPlugin
- Returns:
- The patch version.
-
getDefaultUpdateURLs
@Nonnull @NonnullElements @Unmodifiable @NotLive protected List<URL> getDefaultUpdateURLs() throws PluginExceptionProvides default update locations to use.- Returns:
- default update locations
- Throws:
PluginException
- if a derived class throws it (see derived classes)
-