Package net.shibboleth.profile.plugin
Class PropertyDrivenPlugin<T extends Module>
java.lang.Object
net.shibboleth.profile.plugin.AbstractPlugin<T>
net.shibboleth.profile.plugin.PropertyDrivenPlugin<T>
- Type Parameters:
T- module type
- All Implemented Interfaces:
Plugin<T>
public abstract class PropertyDrivenPlugin<T extends Module>
extends AbstractPlugin<T>
implements Plugin<T>
Implementation of
Plugin 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 InstallableComponentVersionHandles parsing of plugin version.Required modules.Plugin update URLs. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyDrivenPlugin(InputStream inputStream) Constructor.PropertyDrivenPlugin(Class<? extends Plugin<T>> claz) Constructor.PropertyDrivenPlugin(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 anyModules 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.profile.plugin.AbstractPlugin
equals, getDisableOnRemoval, getEnableOnInstall, hashCode, setDisableOnRemoval, setEnableOnInstall, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.shibboleth.profile.plugin.Plugin
getDisableOnRemoval, getEnableOnInstall
-
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
-
PropertyDrivenPlugin
public PropertyDrivenPlugin(@Nonnull Class<? extends Plugin<T>> 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
-
PropertyDrivenPlugin
Constructor.- Parameters:
inputStream- property stream- Throws:
IOException- if unable to read filePluginException- if the plugin is not in a valid state
-
PropertyDrivenPlugin
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 interfacePlugin<T extends Module>- Overrides:
getPluginIdin classAbstractPlugin<T extends Module>- 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.- Specified by:
getUpdateURLsin interfacePlugin<T extends Module>- Returns:
- Zero or more URLs
-
getRequiredModules
Get the IDs of anyModules required for installation of this plugin.- Specified by:
getRequiredModulesin interfacePlugin<T extends Module>- Overrides:
getRequiredModulesin classAbstractPlugin<T extends Module>- Returns:
- module IDs that are required
-
getLicenseFileLocation
Return the classpath location of the license file to emit when --license is specified.- Specified by:
getLicenseFileLocationin interfacePlugin<T extends Module>- Overrides:
getLicenseFileLocationin classAbstractPlugin<T extends Module>- Returns:
- the location
-
getMajorVersion
Return the major version, (as defined by the Java Product Version Policy.- Specified by:
getMajorVersionin interfacePlugin<T extends Module>- Returns:
- The major version.
-
getMinorVersion
Return the minor version, (as defined by the Java Product Version Policy.- Specified by:
getMinorVersionin interfacePlugin<T extends Module>- Returns:
- The minor version.
-
getPatchVersion
Return The patch version, (as defined by the Java Product Version Policy.- Specified by:
getPatchVersionin interfacePlugin<T extends Module>- Overrides:
getPatchVersionin classAbstractPlugin<T extends Module>- Returns:
- The patch version.
-
getDefaultUpdateURLs
Provides default update locations to use.- Returns:
- default update locations
- Throws:
PluginException- if a derived class throws it (see derived classes)
-