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 StringDefault name of plugin properties resource.private org.slf4j.LoggerClass logger.static final StringProperty for plugin ID.static final StringProperty for plugin license.static final StringProperty for plugin's required modules.static final StringPrefix of property for plugin update URL.static final StringProperty for plugin version.private StringNon-defaulted plugin ID.private final PropertiesProperties describing plugin.private PluginVersionHandles 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.intReturn the major version, (as defined by the Java Product Version Policy.intReturn the minor version, (as defined by the Java Product Version Policy.intReturn The patch version, (as defined by the Java Product Version Policy.Return the unique identifier for the plugin.Get the IDs of anyIdPModules required for installation of this plugin.Return the places to look for information for this plugin package.protected voidload()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:
getPluginIdin interfaceIdPPlugin- Overrides:
getPluginIdin 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 anyIdPModules required for installation of this plugin.- Specified by:
getRequiredModulesin interfaceIdPPlugin- Overrides:
getRequiredModulesin classAbstractIdPPlugin- Returns:
- module IDs that are required
-
getLicenseFileLocation
Return the classpath location of the license file to emit when --license is specified.- Specified by:
getLicenseFileLocationin interfaceIdPPlugin- Overrides:
getLicenseFileLocationin 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:
getPatchVersionin interfaceIdPPlugin- Overrides:
getPatchVersionin 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)
-