Class ODataRequestAction
java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestAction
- All Implemented Interfaces:
ODataRequestExecutable
The executable OData action request.
-
Field Summary
Fields inherited from class com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
csrfTokenRetriever, resourcePath, servicePath
-
Constructor Summary
ConstructorDescriptionODataRequestAction
(String servicePath, ODataResourcePath actionPath, String actionParameters, ODataProtocol protocol) Default constructor for OData Action request.ODataRequestAction
(String servicePath, ODataResourcePath actionPath, String actionParameters, String encodedQuery, ODataProtocol protocol) Constructor with StructuredQuery for OData Function request.ODataRequestAction
(String servicePath, String actionName, String actionParameters, ODataProtocol protocol) Convenience constructor for invocations of unbound actions. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
execute
(org.apache.http.client.HttpClient httpClient) Execute the OData request with the provided HttpClient reference.getQuery()
getRelativeUri
(UriEncodingStrategy strategy) Get the static request URI of the OData resource.Use all OData query information to construct a HTTP request query String.int
hashCode()
Methods inherited from class com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
addHeader, addHeaderIfAbsent, addListener, addQueryParameter, getHeaders, getListeners, getProtocol, getQueryParameters, getRelativeUri, getResourcePath, getServicePath, setCsrfTokenRetriever, setHeader, setHeader, tryExecute, tryExecuteWithCsrfToken
-
Constructor Details
-
ODataRequestAction
public ODataRequestAction(@Nonnull String servicePath, @Nonnull String actionName, @Nullable String actionParameters, @Nonnull ODataProtocol protocol) Convenience constructor for invocations of unbound actions. For bound actions useODataRequestAction(String, ODataResourcePath, String, ODataProtocol)
.- Parameters:
servicePath
- The OData service path.actionName
- The action name.actionParameters
- Optional: The action parameters HTTP payload.protocol
- The OData protocol to use.
-
ODataRequestAction
public ODataRequestAction(@Nonnull String servicePath, @Nonnull ODataResourcePath actionPath, @Nullable String actionParameters, @Nonnull ODataProtocol protocol) Default constructor for OData Action request.- Parameters:
servicePath
- The OData service path.actionPath
- Thepath
identifying the action. In case of an unbound action this is simply the action name. If this is a bound action the path must also contain the full path to the action.actionParameters
- Optional: The action parameters as HTTP payload. This is expected to be a JSON formatted String.protocol
- The OData protocol to use.
-
ODataRequestAction
public ODataRequestAction(@Nonnull String servicePath, @Nonnull ODataResourcePath actionPath, @Nullable String actionParameters, @Nullable String encodedQuery, @Nonnull ODataProtocol protocol) Constructor with StructuredQuery for OData Function request.- Parameters:
servicePath
- The OData service path.actionPath
- The fullODataResourcePath
containing the action name, its parameters and possible further path segments. If this is a bound action the path must also contain the full path to the action.actionParameters
- Optional: The action parameters as HTTP payload. This is expected to be a JSON formatted String.encodedQuery
- Optional: An encodedQuery HTTP request query.protocol
- The OData protocol to use.
-
-
Method Details
-
getRelativeUri
Description copied from class:ODataRequestGeneric
Get the static request URI of the OData resource.- Specified by:
getRelativeUri
in classODataRequestGeneric
- Parameters:
strategy
- URI encoding strategy.- Returns:
- The String representation of the request URI.
-
getRequestQuery
Description copied from class:ODataRequestGeneric
Use all OData query information to construct a HTTP request query String.- Overrides:
getRequestQuery
in classODataRequestGeneric
- Returns:
- The request query.
-
execute
@Nonnull public ODataRequestResultGeneric execute(@Nonnull org.apache.http.client.HttpClient httpClient) Description copied from interface:ODataRequestExecutable
Execute the OData request with the provided HttpClient reference.- Parameters:
httpClient
- The HttpClient.- Returns:
- An OData request result.
-
getActionParameters
-
getQuery
-
equals
- Overrides:
equals
in classODataRequestGeneric
-
canEqual
- Overrides:
canEqual
in classODataRequestGeneric
-
hashCode
public int hashCode()- Overrides:
hashCode
in classODataRequestGeneric
-