public interface NativePayloadAccessCallback extends AdapterCallback
NativePayloadDisplayCallback
defines two callback methods:
getNativeMessagePayload
getNativePayloadFileName
These methods should be implemented by adapters in order to return the persisted payload and facilitates in the native payload download. The native payload is persisted by the adapter while message processing. The callback methods will be triggered when the payload download is requested from the download UI.
The native payload is only persisted in case of an error.
There can be multiple payloads for a message. They need to be reported individually.
The implementing class of the callback needs to be registered
by calling AdapterRegistry.registerAdapter
.
AdapterRegistry
,
AdapterRegistryFactory
Modifier and Type | Method and Description |
---|---|
InputStream |
getNativeMessagePayload(String nativePayloadId)
This callback method notifies the
NativePayloadDisplayCallback
implementation to return the native payload that is identified by the nativePayloadId
The implementation is supposed
to return the native payload as a binary stream. |
String |
getNativePayloadFileName(String nativePayloadId)
This callback method,
getNativePayloadFileName notifies the
NativePayloadDisplayCallback
implementation to return the name of the file under which the native
payload was stored. |
InputStream getNativeMessagePayload(String nativePayloadId)
NativePayloadDisplayCallback
implementation to return the native payload that is identified by the nativePayloadId
The implementation is supposed
to return the native payload as a binary stream.nativePayloadId
- the string that uniquely identifies a persisted native payloadInputStream
representing the native payloadString getNativePayloadFileName(String nativePayloadId)
getNativePayloadFileName
notifies the
NativePayloadDisplayCallback
implementation to return the name of the file under which the native
payload was stored. This helps the download UI to enable the download
of the payload in an appropriate manner.
The implementation is supposed to return the file name as a String.
If the native payload needs to be displayed as a plain text,
the implementation should return <filename>.txt. In case nothing is
returned, <payloadId>.txt shall be considered in all cases.
nativePayloadId
- the string that uniquely identifies a persisted native payloadString
, the name of the file that stored the persisted native payloadAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] SAP_XIAF
|
[sap.com] com.sap.aii.af.svc.facade
|
api
|
BC-XI
|
Copyright 2019 SAP AG Complete Copyright Notice