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.
  • Field Details

  • 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.