public class CreateUrlAsAttachmentFluentHelper extends FluentHelperFunction<CreateUrlAsAttachmentFluentHelper,AttachmentContent,AttachmentContent>
Constructor and Description |
---|
CreateUrlAsAttachmentFluentHelper(String servicePath,
String semanticObject,
String linkedSAPObjectKey,
String businessObjectTypeName,
String url,
String urlDescription,
String mIMEType)
Creates a fluent helper object that will execute the CreateUrlAsAttachment OData function import with the
provided parameters.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.http.client.methods.HttpUriRequest |
createRequest(URI uri)
Creates a request for this function based on the given
URI . |
AttachmentContent |
execute(HttpDestinationProperties destination) |
protected Class<AttachmentContent> |
getEntityClass()
Returns a class object of the type this fluent helper works with.
|
protected String |
getFunctionName()
The exact name of the function to be called on the OData Endpoint.
|
protected Map<String,Object> |
getParameters()
Getter for the map of parameters to be used in the function call.
|
protected com.google.gson.JsonElement |
refineJsonResponse(com.google.gson.JsonElement jsonElement)
Transform the JSON element from the response to extract a result entity.
|
executeMultiple, executeSingle, getJsonResponseObjectName
cachingMetadata, getHeadersForRequestAndImplicitRequests, getHeadersForRequestOnly, getParametersForRequestOnly, getServicePath, getThis, getVersionIdentifier, isCachingMetadata, withHeader, withHeaders, withoutCachingMetadata, withQueryParameter
public CreateUrlAsAttachmentFluentHelper(@Nonnull String servicePath, String semanticObject, String linkedSAPObjectKey, String businessObjectTypeName, String url, String urlDescription, String mIMEType)
execute
method on the fluent helper object.servicePath
- Service path to be used to call the functions against.linkedSAPObjectKey
- LinkedSAPObjectKey
Constraints: Not nullable, Maximum length: 90
Original parameter name from the Odata EDM: LinkedSAPObjectKey
businessObjectTypeName
- BusinessObjectTypeName
Constraints: Not nullable, Maximum length: 40
Original parameter name from the Odata EDM: BusinessObjectTypeName
urlDescription
- UrlDescription
Constraints: Not nullable, Maximum length: 255
Original parameter name from the Odata EDM: UrlDescription
semanticObject
- SemanticObject
Constraints: Not nullable, Maximum length: 40
Original parameter name from the Odata EDM: SemanticObject
url
- Url
Constraints: Not nullable, Maximum length: 255
Original parameter name from the Odata EDM: Url
mIMEType
- MIMEType
Constraints: Not nullable, Maximum length: 40
Original parameter name from the Odata EDM: MIMEType
@Nonnull protected Class<AttachmentContent> getEntityClass()
FluentHelperBasic
getEntityClass
in class FluentHelperBasic<CreateUrlAsAttachmentFluentHelper,AttachmentContent,AttachmentContent>
@Nonnull protected String getFunctionName()
FluentHelperFunction
getFunctionName
in class FluentHelperFunction<CreateUrlAsAttachmentFluentHelper,AttachmentContent,AttachmentContent>
@Nullable protected com.google.gson.JsonElement refineJsonResponse(@Nullable com.google.gson.JsonElement jsonElement)
FluentHelperFunction
refineJsonResponse
in class FluentHelperFunction<CreateUrlAsAttachmentFluentHelper,AttachmentContent,AttachmentContent>
jsonElement
- The optional response JSON element@Nonnull protected Map<String,Object> getParameters()
FluentHelperFunction
The map maps the ODataName of a parameter to the corresponding value.
getParameters
in class FluentHelperFunction<CreateUrlAsAttachmentFluentHelper,AttachmentContent,AttachmentContent>
@Nonnull protected org.apache.http.client.methods.HttpUriRequest createRequest(@Nonnull URI uri)
FluentHelperFunction
URI
.
Examples for such requests are HttpGet
and HttpPost
.
createRequest
in class FluentHelperFunction<CreateUrlAsAttachmentFluentHelper,AttachmentContent,AttachmentContent>
uri
- The URI
the request should target.@Nullable public AttachmentContent execute(@Nonnull HttpDestinationProperties destination) throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
execute
in class FluentHelperBasic<CreateUrlAsAttachmentFluentHelper,AttachmentContent,AttachmentContent>
com.sap.cloud.sdk.odatav2.connectivity.ODataException
Copyright © 2020 SAP SE. All rights reserved.