T - Type to transform the output (Entity, EntityCollection)R - Response type resulting from the flowpublic abstract class ResponseHandler<T,R extends SuccessResponse> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ResponseHandler.Serialize
Functional interface, used for injecting the logic and applying the correct serialize method.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.olingo.server.api.OData |
oData |
protected org.apache.olingo.server.api.ServiceMetadata |
serviceMetadata |
| Constructor and Description |
|---|
ResponseHandler(org.apache.olingo.server.api.OData oData,
org.apache.olingo.server.api.ServiceMetadata serviceMetadata) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addSuffix(org.apache.olingo.server.api.uri.UriResource uriResource,
org.apache.olingo.commons.api.data.ContextURL.Builder builder) |
protected abstract T |
deserialize(InputStream inboundContent,
org.apache.olingo.commons.api.format.ContentType inboundContentType,
org.apache.olingo.commons.api.edm.EdmEntityType entityType) |
protected org.apache.olingo.commons.api.data.ContextURL |
getContextUrl(String rawBaseUri,
org.apache.olingo.server.api.uri.UriInfo uriInfo) |
protected org.apache.olingo.commons.api.format.ContentType |
getResponseFormat(org.apache.olingo.commons.api.format.ContentType responseFormat) |
protected abstract ResponseHandler.Serialize |
getSerializationFunctionByUriResourceType(T content,
org.apache.olingo.server.api.serializer.ODataSerializer serializer,
org.apache.olingo.commons.api.edm.EdmEntityType entityType,
org.apache.olingo.server.api.uri.UriInfo uriInfo,
String rawBaseUri) |
protected abstract org.mule.runtime.extension.api.runtime.operation.Result<InputStream,org.mule.runtime.api.util.MultiMap<String,Object>> |
serialize(T content,
R flowResponse,
org.apache.olingo.server.api.uri.UriInfo uriInfo,
org.apache.olingo.server.api.ODataRequest request,
org.apache.olingo.commons.api.format.ContentType responseFormat) |
org.mule.runtime.extension.api.runtime.operation.Result<InputStream,org.mule.runtime.api.util.MultiMap<String,Object>> |
serializeResponse(R flowResponse,
org.apache.olingo.server.api.ODataRequest request,
org.apache.olingo.server.api.uri.UriInfo uriInfo,
org.apache.olingo.commons.api.format.ContentType responseFormat) |
protected final org.apache.olingo.server.api.OData oData
protected final org.apache.olingo.server.api.ServiceMetadata serviceMetadata
public ResponseHandler(org.apache.olingo.server.api.OData oData,
org.apache.olingo.server.api.ServiceMetadata serviceMetadata)
public org.mule.runtime.extension.api.runtime.operation.Result<InputStream,org.mule.runtime.api.util.MultiMap<String,Object>> serializeResponse(R flowResponse, org.apache.olingo.server.api.ODataRequest request, org.apache.olingo.server.api.uri.UriInfo uriInfo, org.apache.olingo.commons.api.format.ContentType responseFormat)
flowResponse - containing Payload and Attributesrequest - OData HTTP RequesturiInfo - OData Uri InforesponseFormat - Expected responseFormatprotected abstract T deserialize(InputStream inboundContent, org.apache.olingo.commons.api.format.ContentType inboundContentType, org.apache.olingo.commons.api.edm.EdmEntityType entityType)
protected abstract org.mule.runtime.extension.api.runtime.operation.Result<InputStream,org.mule.runtime.api.util.MultiMap<String,Object>> serialize(T content, R flowResponse, org.apache.olingo.server.api.uri.UriInfo uriInfo, org.apache.olingo.server.api.ODataRequest request, org.apache.olingo.commons.api.format.ContentType responseFormat)
protected abstract void addSuffix(org.apache.olingo.server.api.uri.UriResource uriResource,
org.apache.olingo.commons.api.data.ContextURL.Builder builder)
protected abstract ResponseHandler.Serialize getSerializationFunctionByUriResourceType(T content, org.apache.olingo.server.api.serializer.ODataSerializer serializer, org.apache.olingo.commons.api.edm.EdmEntityType entityType, org.apache.olingo.server.api.uri.UriInfo uriInfo, String rawBaseUri)
protected org.apache.olingo.commons.api.data.ContextURL getContextUrl(String rawBaseUri, org.apache.olingo.server.api.uri.UriInfo uriInfo)
protected org.apache.olingo.commons.api.format.ContentType getResponseFormat(org.apache.olingo.commons.api.format.ContentType responseFormat)
Copyright © 2024 MuleSoft, Inc.. All rights reserved.