Class PluginInfo
java.lang.Object
net.shibboleth.idp.installer.plugin.impl.PluginInfo
Class which encapsulates the information about a given plugin as downloaded
fro the plugin URL (or file).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether the information was sufficient.private final Map<PluginVersion,
Pair<URL, String>> The Download information.private final org.slf4j.Logger
Class logger.private final String
The pluginId.private static final Pattern
regexp for spaces.private final Map<PluginVersion,
PluginState.VersionInfo> The support information. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the raw version imfo for this plugin.private String
getDefaultedValue
(Properties props, String interfix, String version) Look up the key derived from the pluginId, the interfix and the version, but if that fails look for a templated definition.getUpdateBaseName
(PluginVersion version) Get the base Name for this version.getUpdateURL
(PluginVersion version) Get the base URL for this version.private void
handleAvailableVersion
(Properties props, String version) Given a version find out more.private void
handleAvailableVersions
(Properties props, String availableVersions) Given a list of versions find out more.boolean
Did the property file have enough information?static boolean
isSupportedWithIdPVersion
(PluginState.VersionInfo pluginVersionInfo, PluginVersion idPVersion) Is the specified plugin supported with this IdP version.boolean
isSupportedWithIdPVersion
(PluginVersion pluginVersion, PluginVersion idPVersion) Is the specified plugin supported with this IdP version.private void
parse
(Properties props) (try to) populate the information about this plugin.
-
Field Details
-
SPACE_CONTAINING
regexp for spaces. -
log
@Nonnull private final org.slf4j.Logger logClass logger. -
versionInfo
The support information. -
downloadInfo
The Download information. -
pluginId
The pluginId. -
allInfoPresent
private boolean allInfoPresentWhether the information was sufficient.
-
-
Constructor Details
-
PluginInfo
Constructor.- Parameters:
id
- the id we care aboutprops
- all the properties.
-
-
Method Details
-
isInfoComplete
public boolean isInfoComplete()Did the property file have enough information?- Returns:
- true if something was missing.
-
getUpdateURL
Get the base URL for this version.- Parameters:
version
- which version- Returns:
- the base URL
-
getUpdateBaseName
Get the base Name for this version.- Parameters:
version
- which version- Returns:
- the base name
-
getAvailableVersions
Get the raw version imfo for this plugin.- Returns:
- the info.
-
parse
(try to) populate the information about this plugin.- Parameters:
props
- what to load.
-
handleAvailableVersion
Given a version find out more.- Parameters:
props
- the property files for this plugin we are looking atversion
- the version in question.
-
handleAvailableVersions
Given a list of versions find out more.- Parameters:
props
- the property files for this plugin we are looking atavailableVersions
- a space delimited array of versions
-
getDefaultedValue
Look up the key derived from the pluginId, the interfix and the version, but if that fails look for a templated definition.- Parameters:
props
- what to look ininterfix
- the interface (between the ID and the version)version
- the version.- Returns:
- the suitable value
-
isSupportedWithIdPVersion
Is the specified plugin supported with this IdP version.- Parameters:
pluginVersion
- the version if the plugin as aPluginVersion
idPVersion
- the version if the IDP as aPluginVersion
- Returns:
- whether it is supported.
-
isSupportedWithIdPVersion
public static boolean isSupportedWithIdPVersion(PluginState.VersionInfo pluginVersionInfo, PluginVersion idPVersion) Is the specified plugin supported with this IdP version. Worker method for all 'isSupportedWith' classes.- Parameters:
pluginVersionInfo
- the version info to consideridPVersion
- the version as aPluginVersion
- Returns:
- whether it is supported.
-