Class InstallableComponentInfo
java.lang.Object
net.shibboleth.profile.installablecomponent.InstallableComponentInfo
Class which encapsulates the information about a given Installable Component as downloaded
from the appropriate location (as a Properties file).
Different variants deal with the max and min supported versions (Plugins get them from a file
Non plugins derive them from the version under consideration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEncapsulation of the information about a given IdP version. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether the information was sufficient.private final StringThe Id.private final Map<InstallableComponentVersion,Pair<URL, String>> The Download information.private final org.slf4j.LoggerClass logger.private static final Patternregexp for spaces.private final Map<InstallableComponentVersion,InstallableComponentInfo.VersionInfo> The support information. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the raw version info for this component.protected StringGet the Installable Component Id under considerationprivate StringgetDefaultedValue(Properties props, String interfix, String version) Look up the key derived from the component, the interfix and the version, but if that fails look for a templated definition.protected abstract InstallableComponentVersiongetMaxVersion(Properties props, String version) Find the max supported version version we can be installed into.protected abstract InstallableComponentVersiongetMinVersion(Properties props, String version) Find the min supported version we can be installed into.Get the base Name for this version.getUpdateURL(InstallableComponentVersion version) Get the base URL for this version.private voidhandleAvailableVersion(Properties props, String version) Given a version find out more.private voidhandleAvailableVersions(Properties props, String availableVersions) Given a list of versions find out more.booleanDid the property file have enough information?static booleanisSupportedWithIdPVersion(InstallableComponentInfo.VersionInfo componentVersionInfo, InstallableComponentVersion installIntoVersion) Can the specified component be installed into this version? Worker method for all 'isSupportedWith' classes.booleanisSupportedWithIdPVersion(InstallableComponentVersion componentVersion, InstallableComponentVersion intsallIntoVersion) Can the specified component be installed into this version?private voidparse(Properties props) (try to) populate the information about this component.
-
Field Details
-
SPACE_CONTAINING
regexp for spaces. -
log
@Nonnull private final org.slf4j.Logger logClass logger. -
versionInfo
@Nonnull private final Map<InstallableComponentVersion,InstallableComponentInfo.VersionInfo> versionInfoThe support information. -
downloadInfo
The Download information. -
componentId
The Id. -
allInfoPresent
private boolean allInfoPresentWhether the information was sufficient.
-
-
Constructor Details
-
InstallableComponentInfo
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
@Nonnull public Map<InstallableComponentVersion,InstallableComponentInfo.VersionInfo> getAvailableVersions()Get the raw version info for this component.- Returns:
- the info.
-
getComponentId
Get the Installable Component Id under consideration- Returns:
- Returns the componentId.
-
parse
(try to) populate the information about this component.- Parameters:
props- what to load.
-
handleAvailableVersion
Given a version find out more.- Parameters:
props- the property files for this component we are looking atversion- the version in question.
-
getMaxVersion
@Nullable protected abstract InstallableComponentVersion getMaxVersion(@Nonnull Properties props, @Nonnull String version) Find the max supported version version we can be installed into.- Parameters:
props- the properties to look atversion- the component version we are enquiring about- Returns:
- the version null if not found.
-
getMinVersion
@Nullable protected abstract InstallableComponentVersion getMinVersion(@Nonnull Properties props, @Nonnull String version) Find the min supported version we can be installed into.- Parameters:
props- the properties to look atversion- the component version we are enquiring about- Returns:
- the version null if not found.
-
handleAvailableVersions
Given a list of versions find out more.- Parameters:
props- the property files for the component we are looking atavailableVersions- a space delimited array of versions
-
getDefaultedValue
@Nullable private String getDefaultedValue(@Nonnull Properties props, @Nonnull String interfix, @Nonnull String version) Look up the key derived from the component, 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
public boolean isSupportedWithIdPVersion(@Nonnull InstallableComponentVersion componentVersion, @Nonnull InstallableComponentVersion intsallIntoVersion) Can the specified component be installed into this version?- Parameters:
componentVersion- the version if the component as aInstallableComponentVersionintsallIntoVersion- the version if the IDP as aInstallableComponentVersion- Returns:
- whether it is supported.
-
isSupportedWithIdPVersion
public static boolean isSupportedWithIdPVersion(@Nonnull InstallableComponentInfo.VersionInfo componentVersionInfo, @Nonnull InstallableComponentVersion installIntoVersion) Can the specified component be installed into this version? Worker method for all 'isSupportedWith' classes.- Parameters:
componentVersionInfo- the version info to considerinstallIntoVersion- the version as aInstallableComponentVersion- Returns:
- whether it is supported.
-