|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.datapower.wamt.clientAPI.URLSource
public class URLSource
A URLSource is a convenience class to access blob objects from various schemes e.g. http, file, device.
Usage:
To reference a filenew URLSource("file:///C:/DataPowerData/my-config-source.zip");
To reference a resource via http new URLSource("http://host:port/my-config-source.zip");
To reference domain on a device new URLSource("device://device-host/myDomain");
To reference a domain version in the repository new URLSource("repos://device-host/myDomain/domain-version/2");
To reference a deployment policy version in the repository new URLSource("repos://device-host/myDomain/policy-version/2");
Note: Using the 'device' scheme or 'repos' scheme requires that a corresponding
Device
object be created in the Manager. The device-host
must be identical to
the hostname
parameter used in Device.createDevice(String, String, String, String, int)
.
Host names must be valid host names per RFC 952
and RFC 1123.
Blob
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT_2009_2013
|
static java.lang.String |
SCHEME_DEVICE
|
static java.lang.String |
SCHEME_FILE
|
static java.lang.String |
SCHEME_HTTP
|
static java.lang.String |
SCHEME_HTTPS
|
static java.lang.String |
SCHEME_REPOS
|
static java.lang.String |
URI_PATH_DEPPOL_VER
|
static java.lang.String |
URI_PATH_DOMAINVER
|
Constructor Summary | |
---|---|
URLSource(java.lang.String specs)
Create a new URLSource object with the provided spec (URL). |
Method Summary | |
---|---|
Blob |
getBlob()
This method returns a Blob object from the spec sent to the constructor (e.g. |
Blob |
getFirmwareBlob()
This method returns a Blob object from the spec sent to the constructor (e.g. |
long |
getLastModified()
Use this method to determine the "last modified" time of the source referenced by this object. |
java.lang.String |
getScheme()
Use this method to determine the scheme of the URL referenced by this object. |
java.lang.String |
getURL()
Use this method to determine the URL referenced by this object. |
int |
getVersion()
Use this method to determine the version referred to by this URLSource |
boolean |
hasVersionPath()
Use this method to determine if the URLSource refers to a version |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SCHEME_HTTP
public static final java.lang.String SCHEME_HTTPS
public static final java.lang.String SCHEME_FILE
public static final java.lang.String SCHEME_DEVICE
public static final java.lang.String SCHEME_REPOS
public static final java.lang.String URI_PATH_DOMAINVER
public static final java.lang.String URI_PATH_DEPPOL_VER
public static final java.lang.String COPYRIGHT_2009_2013
Constructor Detail |
---|
public URLSource(java.lang.String specs) throws java.net.URISyntaxException
spec
- - the URL of the resource to be addressed by this URLSourceBlob
Method Detail |
---|
public java.lang.String getURL()
public java.lang.String getScheme()
Blob
public boolean hasVersionPath()
Blob
public int getVersion()
Blob
public long getLastModified() throws java.io.IOException
Blob
,
Date
public Blob getBlob() throws java.io.IOException, DeletedException, NotExistException, InUseException, InvalidParameterException, AMPException
Blob
public Blob getFirmwareBlob() throws java.net.MalformedURLException, InvalidParameterException
Blob
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |