public interface ManagedArtifact
ManagedArtifact represents a basic artifact successfully saved to SeLion grid by an HTTP POST method
call. All implementations MUST provide a default, no-argument constructor for the ManagedArtifact
implementation.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ManagedArtifact.RequestParameters
Provides access to and/or represents the HTTP request parameters used by the @{link
ManagedArtifact} |
| Modifier and Type | Field and Description |
|---|---|
static String |
ARTIFACT_FILE_NAME |
static String |
ARTIFACT_FOLDER_NAME |
| Modifier and Type | Method and Description |
|---|---|
String |
getAbsolutePath()
Return the path of the artifact file
|
byte[] |
getArtifactContents()
Returns the contents of the artifact as a byte array.
|
String |
getArtifactName()
Returns the artifact name.
|
String |
getHttpContentType()
Returns the MIME content type for this
ManagedArtifact |
<T extends ManagedArtifact.RequestParameters> |
getRequestParameters()
Returns the headers associated with this
ManagedArtifact |
void |
initFromPath(String absolutePath)
Initialize the artifact by it's file path.
|
void |
initFromUploadedArtifact(UploadedArtifact uploaded)
Initialize the artifact by an in-bound uploaded artifact
|
boolean |
isExpired()
Returns true if this
ManagedArtifact has expired. |
boolean |
matchesPathInfo(String pathInfo)
Matches the artifact based on some path info.
|
static final String ARTIFACT_FILE_NAME
static final String ARTIFACT_FOLDER_NAME
void initFromPath(String absolutePath)
absolutePath - absolute path to the artifact. Must be in the ServerRepository path. For example:
/{serverRepository}/{artifactFolder}/{artifactName}void initFromUploadedArtifact(UploadedArtifact uploaded)
uploaded - instance of UploadedArtifact which will contain the meta-info for the uploaded artifactString getArtifactName()
byte[] getArtifactContents()
DownloadResponderboolean matchesPathInfo(String pathInfo)
ServerRepository to find artifacts by a
relative, publicly exposed (via the download URL), pathpathInfo - String path information to match against. For example:
/{artifactFolder}/{artifactName}String getAbsolutePath()
ServerRepository path. For example:
/{serverRepository}/{artifactFolder}/{artifactName}boolean isExpired()
ManagedArtifact has expired. Called by the ServerRepository to clean up
artifacts.String getHttpContentType()
ManagedArtifact<T extends ManagedArtifact.RequestParameters> T getRequestParameters()
ManagedArtifactManagedArtifact.RequestParametersCopyright © 2016 PayPal Open Source. All rights reserved.