Package com.isomorphic.maven.packaging
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 Distributionget(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 StringgetRemoteIndex(String buildNumber, String buildDate)Returns the relative URL representing the location of the distribution's "remote index", or download page.protected StringgetRemoteIndexFilter()Returns a comma-separated list of all theselectorsthat should be used to determine which hyperlinks should be used to download files from smartclient.com.voidunpack(File to)Extract the relevant contents from each file in the distribution.
-
Method Details
-
get
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 configuredlicense- 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
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 matchingthe 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
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.1dbuildDate- 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
Returns a comma-separated list of all theselectorsthat should be used to determine which hyperlinks should be used to download files from smartclient.com.- Returns:
- a comma-separated list of all the
selectorsthat should be used to determine which hyperlinks should be used to download files from smartclient.com
-
unpack
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
-