Class Distribution

java.lang.Object
com.isomorphic.maven.packaging.Distribution

public final class Distribution
extends Object
Models both the location/filenames of remote SDK bundles and their contents. Takes care to normalize product families into some common denominator
  • Method Summary

    Modifier and Type Method Description
    static Distribution get​(Product product, License license)
    Returns a fully-prepared Distribution instance representing an Isomorphic build, suitable for invoking download or repackaging operations against SDK bundles and their contents.
    Set<File> getFiles()
    Returns the set of files that were (at one time or another) downloaded from smartclient.com, usually compressed .zip or .jar files.
    protected String getRemoteIndex​(String buildNumber, String buildDate)
    Returns the relative URL representing the location of the distribution's "remote index", or download page.
    protected String getRemoteIndexFilter()
    Returns a comma-separated list of all the selectors that should be used to determine which hyperlinks should be used to download files from smartclient.com.
    void unpack​(File to)
    Extract the relevant contents from each file in the distribution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public static Distribution get​(Product product, License license)
      Returns a fully-prepared Distribution instance representing an Isomorphic build, suitable for invoking download or repackaging operations against SDK bundles and their contents.
      Parameters:
      product - The propduct for which a distribution exists and has been previously configured
      license - The license under which the product is distributed and with which to execute some repackaing operation
      Returns:
      The fully-prepared Distribution instance, suitable for downloading and/or manipulating SDK bundles and their contents
      Throws:
      IllegalArgumentException - when no instance is found for the given Product, License combination
    • getFiles

      public Set<File> getFiles()
      Returns the set of files that were (at one time or another) downloaded from smartclient.com, usually compressed .zip or .jar files. Note that the set is necessarily empty at initialization - Some index, local or remote, must first be interrogated to find a list of files matching the patterns configured for this object. Any matched resources must then be resolved to local files before having their references added to this collection.
      • SmartClient_AnalyticsModule-2014-01-01.zip
      • SmartClient_DrawingModule-2014-01-01.zip
      Returns:
      the Set of files making up the distribution.
      See Also:
      Downloads
    • getRemoteIndex

      protected String getRemoteIndex​(String buildNumber, String buildDate)
      Returns the relative URL representing the location of the distribution's "remote index", or download page. e.g.,

      /builds/SmartGWT/4.1d/EnterpriseEval/2014-01-01

      Parameters:
      buildNumber - the buildNumber as found in the download url. e.g., 4.1d
      buildDate - the buildDate as found in the download url. e.g., 2014-01-01
      Returns:
      the URL representing the location of the distribution's "remote index", or download page.
    • getRemoteIndexFilter

      protected String getRemoteIndexFilter()
      Returns a comma-separated list of all the selectors that should be used to determine which hyperlinks should be used to download files from smartclient.com.
      Returns:
      a comma-separated list of all the selectors that should be used to determine which hyperlinks should be used to download files from smartclient.com
    • unpack

      public void unpack​(File to) throws IOException
      Extract the relevant contents from each file in the distribution. Additionally creates ZIP/JAR files from specified resources (e.g., javadoc).
      Parameters:
      to - The directory to which each file should be extracted.
      Throws:
      IOException - on any IOException during unzip operations