FluentHelperT
- The fluent helper type.ObjectT
- The type of the object this OData request operates on, if any.ResultT
- The type of the result entity, if any.public abstract class FluentHelperFunction<FluentHelperT,ObjectT extends VdmObject<?>,ResultT> extends FluentHelperBasic<FluentHelperT,ObjectT,ResultT>
executing
it.Modifier and Type | Field and Description |
---|---|
static int |
END_OF_ERROR_CODES |
static int |
START_OF_ERROR_CODES |
Constructor and Description |
---|
FluentHelperFunction(String servicePath)
Instantiates this fluent helper using the given service path to send the requests.
|
Modifier and Type | Method and Description |
---|---|
protected abstract org.apache.http.client.methods.HttpUriRequest |
createRequest(URI uri)
Creates a request for this function based on the given
URI . |
protected List<ObjectT> |
executeMultiple(ErpConfigContext configContext)
Default implementation for the case that this function retuns a collection of entries.
|
protected ObjectT |
executeSingle(ErpConfigContext configContext)
Default implementation for the case that this function returns a single type.
|
protected abstract String |
getFunctionName()
The exact name of the function to be called on the OData Endpoint.
|
protected abstract Map<String,Object> |
getParameters()
Getter for the map of parameters to be used in the function call.
|
asResilientCommand, asResilientCommand, execute, execute, getEntityClass, getHeadersForRequestAndImplicitRequests, getHeadersForRequestOnly, getServicePath, getThis, getVersionIdentifier, withCustomHttpHeader, withCustomHttpHeaders
public static final int START_OF_ERROR_CODES
public static final int END_OF_ERROR_CODES
@Nonnull protected abstract Map<String,Object> getParameters()
The map maps the ODataName of a parameter to the corresponding value.
@Nonnull protected abstract String getFunctionName()
@Nonnull protected abstract org.apache.http.client.methods.HttpUriRequest createRequest(@Nonnull URI uri)
URI
.
Examples for such requests are HttpGet
and HttpPost
.
uri
- The URI
the request should target.@Nullable protected ObjectT executeSingle(@Nonnull ErpConfigContext configContext) throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
This method can be used in subclasses to implement the FluentHelperBasic.execute(ErpConfigContext)
method.
configContext
- The configuration to run the function against.com.sap.cloud.sdk.odatav2.connectivity.ODataException
- If the execution of the function failed.@Nonnull protected List<ObjectT> executeMultiple(@Nonnull ErpConfigContext configContext) throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
This method can be used in subclasses to implement the FluentHelperBasic.execute(ErpConfigContext)
method.
configContext
- The configuration to run the function against.com.sap.cloud.sdk.odatav2.connectivity.ODataException
- If the execution of the function failed.Copyright © 2018 SAP SE. All rights reserved.