Package net.shibboleth.profile.installablecomponent

# Class InstallableComponentInfo

java.lang.Object
net.shibboleth.profile.installablecomponent.InstallableComponentInfo

public abstract class InstallableComponentInfo extends Object
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 Classes
Modifier and Type
Class
Description
`static class`
`InstallableComponentInfo.VersionInfo`
Encapsulation of the information about a given IdP version.

## Field Summary

Fields
Modifier and Type
Field
Description
`private boolean`
`allInfoPresent`
Whether the information was sufficient.
`private final String`
`componentId`
The Id.
`private final Map<InstallableComponentVersion,Pair<URL,String>>`
`downloadInfo`
The Download information.
`private final org.slf4j.Logger`
`log`
Class logger.
`private static final Pattern`
`SPACE_CONTAINING`
regexp for spaces.
`private final Map<InstallableComponentVersion,InstallableComponentInfo.VersionInfo>`
`versionInfo`
The support information.

## Constructor Summary

Constructors
Constructor
Description
`InstallableComponentInfo(String id, Properties props)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Map<InstallableComponentVersion,InstallableComponentInfo.VersionInfo>`
`getAvailableVersions()`
Get the raw version info for this component.
`protected String`
`getComponentId()`
Get the Installable Component Id under consideration
`private String`
`getDefaultedValue(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 InstallableComponentVersion`
`getMaxVersion(Properties props, String version)`
Find the max supported version version we can be installed into.
`protected abstract InstallableComponentVersion`
`getMinVersion(Properties props, String version)`
Find the min supported version we can be installed into.
`String`
`getUpdateBaseName(InstallableComponentVersion version)`
Get the base Name for this version.
`URL`
`getUpdateURL(InstallableComponentVersion 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`
`isInfoComplete()`
Did the property file have enough information?
`static boolean`
`isSupportedWithIdPVersion(InstallableComponentInfo.VersionInfo componentVersionInfo, InstallableComponentVersion installIntoVersion)`
Can the specified component be installed into this version? Worker method for all 'isSupportedWith' classes.
`boolean`
`isSupportedWithIdPVersion(InstallableComponentVersion componentVersion, InstallableComponentVersion intsallIntoVersion)`
Can the specified component be installed into this version?
`private void`
`parse(Properties props)`
(try to) populate the information about this component.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### SPACE_CONTAINING

@Nonnull private static final Pattern SPACE_CONTAINING
regexp for spaces.

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### versionInfo

@Nonnull private final Map<InstallableComponentVersion,InstallableComponentInfo.VersionInfo> versionInfo
The support information.

### downloadInfo

@Nonnull private final Map<InstallableComponentVersion,Pair<URL,String>> downloadInfo
The Download information.

### componentId

@Nonnull private final String componentId
The Id.

### allInfoPresent

private boolean allInfoPresent
Whether the information was sufficient.

## Constructor Details

### InstallableComponentInfo

public InstallableComponentInfo(@Nonnull String id, @Nonnull Properties props)
Constructor.

Parameters:
  `id` - the id we care about
  `props` - all the properties.

## Method Details

### isInfoComplete

public boolean isInfoComplete()
Did the property file have enough information?

Returns:
  true if something was missing.

### getUpdateURL

@Nullable public URL getUpdateURL(@Nonnull InstallableComponentVersion version)
Get the base URL for this version.

Parameters:
  `version` - which version
Returns:
  the base URL

### getUpdateBaseName

@Nullable public String getUpdateBaseName(@Nonnull InstallableComponentVersion version)
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

@Nonnull protected String getComponentId()
Get the Installable Component Id under consideration

Returns:
  Returns the componentId.

### parse

private void parse(@Nonnull Properties props)
(try to) populate the information about this component.

Parameters:
  `props` - what to load.

### handleAvailableVersion

private void handleAvailableVersion(@Nonnull Properties props, @Nonnull String version)
Given a version find out more.

Parameters:
  `props` - the property files for this component we are looking at
  `version` - 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 at
  `version` - 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 at
  `version` - the component version we are enquiring about
Returns:
  the version null if not found.

### handleAvailableVersions

private void handleAvailableVersions(@Nonnull Properties props, @Nonnull String availableVersions)
Given a list of versions find out more.

Parameters:
  `props` - the property files for the component we are looking at
  `availableVersions` - 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 in
  `interfix` - 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 a `InstallableComponentVersion`
  `intsallIntoVersion` - the version if the IDP as a `InstallableComponentVersion`
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 consider
  `installIntoVersion` - the version as a `InstallableComponentVersion`
Returns:
  whether it is supported.