public interface IContent
This class provides access both to the actual content and the meta data related to it. This set of information MUST be consistent.
The following usage patterns need to be considered:
Accessing just the meta data: This is the typical call pattern when the client only needs the meta data, but won't actually read the content (for instance when displaying information about the members of a collection). In this case, getInputStream() will not be called. Note that implementations should avoid to internally open an input stream if the caller doesn't access it.
Accessing both content and meta data: This requires that the meta data returned accurately reflects the input stream that is returned and is the typical use case for an HTTP GET operation on the content (content length when known MUST be accurate). In this scenario, a client SHOULD call getInputStream() first, this allows the implementation to get a consistent set of meta data related to the input stream. If the client does not follow this recommended calling sequence, an implementation may have to signal a ContentException when it detects that meta data returned earlier does not match the actual data of the input stream opened. If the resource was deleted after the content object was created, the implementation SHOULD report a ResourceNotFoundException when trying to retrieve the input stream.
Modifier and Type | Method and Description |
---|---|
IContentMetadata |
getContentMetadata()
Get the content metadata.
|
InputStream |
getInputStream()
Get input stream for the resource content.
|
InputStream getInputStream() throws ResourceException
ResourceException
- when the operation failedIContentMetadata getContentMetadata() throws ResourceException
ResourceException
- when the operation failedAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice