|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentServices
This is the interface to the content services provided to a plugin's ContentFacet
. A content facet
implementation can use these services to request information from the plugin container.
Method Summary | |
---|---|
long |
downloadPackageBits(ContentContext context,
PackageDetailsKey packageDetailsKey,
OutputStream outputStream,
boolean resourceExists)
Requests that the plugin container download and stream the bits for the specified package. |
long |
downloadPackageBitsForChildResource(ContentContext context,
String childResourceTypeName,
PackageDetailsKey key,
OutputStream outputStream)
Requests the plugin container download and stream the bits for the specified package. |
long |
downloadPackageBitsRange(ContentContext context,
PackageDetailsKey packageDetailsKey,
OutputStream outputStream,
long startByte,
long endByte,
boolean resourceExists)
Requests that the plugin container download and stream the bits for the specified package. |
long |
getPackageBitsLength(ContentContext context,
PackageDetailsKey packageDetailsKey)
Requests the size, in bytes, of the identified package version. |
PageList<PackageVersionMetadataComposite> |
getPackageVersionMetadata(ContentContext context,
PageControl pc)
Requests all metadata for all package versions that the calling resource
component is subscribed to see . |
String |
getResourceSubscriptionMD5(ContentContext context)
Gets the MD5 hash which identifies a resource "content subscription". |
Method Detail |
---|
long downloadPackageBits(ContentContext context, PackageDetailsKey packageDetailsKey, OutputStream outputStream, boolean resourceExists)
context
- identifies the resource requesting the bitspackageDetailsKey
- identifies the packageoutputStream
- an output stream where the plugin container should write the package contents. It is up
to the plugin, before making this call, to prepare this output stream in order to write
the package content to an appropriate location. It is also up to the plugin to close
this stream after this call completes.
long downloadPackageBitsRange(ContentContext context, PackageDetailsKey packageDetailsKey, OutputStream outputStream, long startByte, long endByte, boolean resourceExists)
context
- identifies the resource requesting the bitspackageDetailsKey
- identifies the packageoutputStream
- an output stream where the plugin container should write the package contents. It is up
to the plugin, before making this call, to prepare this output stream in order to write
the package content to an appropriate location.startByte
- the first byte (inclusive) of the byte range to retrieve and output (bytes start at
index 0)endByte
- the last byte (inclusive) of the byte range to retrieve and output (-1 means up to EOF)
(bytes start at index 0)
long downloadPackageBitsForChildResource(ContentContext context, String childResourceTypeName, PackageDetailsKey key, OutputStream outputStream)
context
- identifies the parent resource onto which the child resource will be createdchildResourceTypeName
- identifies the type of child resource being createdkey
- identifies the specific package being deployed for the resource creationoutputStream
- an output stream where the plugin container should write the package contents. It
is up to the plugin, before making this call, to prepare this output stream in
order to write the package content to an appropriate location. It is also up to
the caller to close this stream once the write is completed.
long getPackageBitsLength(ContentContext context, PackageDetailsKey packageDetailsKey)
context
- identifies the resource requesting the infopackageDetailsKey
- identifies the package whose size is to be returned
PageList<PackageVersionMetadataComposite> getPackageVersionMetadata(ContentContext context, PageControl pc)
metadata
for all package versions that the calling resource
component is subscribed to see
. The returned object has the metadata bytes that
are meaningful to the calling plugin component.
Because the result set is potentially large, callers should consider caching the returned data. You can use
getResourceSubscriptionMD5(ContentContext)
to determine when the cached data is stale.
context
- identifies the resource requesting the datapc
- this method can potentially return a large set; this page control object allows the caller to
page through that large set, as opposed to requesting the entire set in one large chunk
String getResourceSubscriptionMD5(ContentContext context)
context
- identifies the resource requesting the data
getPackageVersionMetadata(ContentContext, PageControl)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |