This interface offers several convenience methods provided by the framework.
Method COPY_DATA_TO_REF
This is a convenience method to get a data reference of a type any variable.
Parameter |
Description |
---|---|
IS_DATA |
Variable of type any which has to be either a structure or an internal table. |
CR_DATA |
Data reference of the imported variable. |
Method CHECK_IF_IS_NOT_MODIFIED
This method can be used to fill es_response_context-is_not_modified. It checks if data was not modified based on:
if-modified-since HTTP request header (time stamp)
last-modified time stamp provided by the application
In case last-modified is older than if-modified-since then the data is up-to-date. In this case the returning parameter rv_is_not_modified is set to 'X' (/iwbep/if_mgw_appl_types=>gcs_modification_status-is_not_modified) This method can be used to fill es_response_context-is_not_modified. In case es_response_context-is_not_modified is set to 'X' ( /iwbep/if_mgw_appl_types=>gcs_modification_status-is_not_modified) then an HTTP response 304 ‚Not Modified‘ shall be sent.
Parameter |
Description |
---|---|
IV_IF_MODIFIED_SINCE |
Variable of type TZNTSTMPS, the if-modified-since time stamp. |
IV_LAST_MODIFIED |
Variable of type TZNTSTMPS, the last-modified-since time stamp. |
RV_IS_NOT_MODIFIED |
Variable of type /IWBEP/MGW_IS_NOT_MODIFIED. |
Method SET_HEADER
This method adds the header parameters to the HTTP response in a key/value approach.
Parameter |
Description |
---|---|
IS_HEADER |
Name/value pair as header parameter of the HTTP response. By setting this parameter you can, for example, influence the caching behavior. |
Method SET_ETAG
This method sets the HTTP ETag in the HTTP response header.
This method is only needed in the OData Compatibility Mode for SP 02. The ETag needs to be set in the READ_ENTITY method with the value of the property which is marked as ETag. You do not have to set the ETag in the OData Standard Mode any more.
Parameter |
Description |
---|---|
IV_VALUE |
ETag value |
Method GET_LOGGER
This method returns an instance of the OData Channel logger. It should be used by the DPC (data provider class) for logging purposes.
Parameter |
Description |
---|---|
RO_LOGGER |
Instance |
Method GET_MESSAGE_CONTAINER
This method returns an instance of the OData Channel message container. It should be used by the DPC to pass messages back to the framework.
Parameter |
Description |
---|---|
RO_MESSAGE_CONTAINER |
Instance |
Method GET_RESPONSE_UTIL
This method returns an instance of an utility that supports the creation of specific information in the response message.
The response utility provides a single method GET_TARGET_FROM_INTERNAL_NAMES. This method gets an entity type name and a path to a property (specified using internal names separated by '-') as input and returns a URI substring that should be used to set the target information for messages (see method signatures of the message container).
Parameter |
Description |
---|---|
RO_RESPONSE_UTIL |
Instance |
Method GET_DP_FACADE
This method returns a facade which is reserved for future features supporting content development. Currently it does not contain any methods.
Parameter |
Description |
---|---|
RO_DP_FACADE |
To access special utility methods |
Method INIT_DP_FOR_UNIT_TEST
This method is used to initialize a data provider instance for the usage in a unit test.
An instance of the new request context (/IWBEP/CL_MGW_REQUEST_UNITTST) is created.
The request values are assigned to the request context instance.
Member variables of the /IWBEP/CL_MGW_ABS_DATA are initialized and set:
MO_CONTEXT
MR_REQUEST_DETAILS
MR_SERVICE_DOCUMENT_NAME
MR_SERVICE_VERSION
MR_SERVICE_NAMESPACE
Logger and message container instances are retrieved.
Parameter |
Description |
---|---|
IS_REQUEST_CONTEXT |
Structure containing the new request context for unit tests, TYPE /IWBEP/CL_MGW_REQUEST_UNITTST=>TY_S_MGW_REQUEST_CONTEXT_UNIT |
RO_REQUEST_CONTEXT |
Request context object for further usage through the DPC. TYPE REF TO /IWBEP/CL_MGW_REQUEST_UNITTST |