public class OlingoUtils extends Object
| Constructor and Description |
|---|
OlingoUtils() |
| Modifier and Type | Method and Description |
|---|---|
static APIKitODataResponse |
getAPIKitResponse(org.apache.olingo.server.api.ODataResponse response)
Casts Olingo's
ODataResponse to routing APIKitODataResponse. |
static org.mule.runtime.api.util.MultiMap<String,String> |
getCustomQueryOptions(List<org.apache.olingo.server.api.uri.queryoption.CustomQueryOption> customQueryOptions)
Gets a map of custom query options name and values from Olingo's
CustomQueryOption. |
static Optional<String> |
getEntitySetName(org.apache.olingo.server.api.uri.UriInfo uriInfo)
Given the URI details, it looks for the requested entity set name.
|
static List<String> |
getEntityTypeFields(org.apache.olingo.commons.api.edm.EdmEntityType entityType)
Given an entity type, gets the list of all its properties names.
|
static Map<String,String> |
getEntityTypeKeysFromUriParameters(List<org.apache.olingo.server.api.uri.UriResource> uriResources)
Given the URI resource segments, it returns a map of all the entity type keys and values provided.
|
static Optional<String> |
getEntityTypeName(org.apache.olingo.commons.api.edm.EdmEntityType entityType)
Gets the entity type's name if defined or an empty string otherwise.
|
static Optional<org.apache.olingo.commons.api.edm.EdmEntityType> |
getReturnType(org.apache.olingo.server.api.uri.UriInfo uriInfo)
Given the URI details, it looks for the requested entity type.
|
static RoutingKey |
getRoutingKey(org.apache.olingo.server.api.ODataRequest request,
org.apache.olingo.server.api.uri.UriInfo uriInfo)
Builds a
RoutingKey based on the request method and the URI segment details. |
static Map<String,String> |
getSystemQueryOptions(List<org.apache.olingo.server.api.uri.queryoption.SystemQueryOption> systemQueryOptionOptions)
Gets a map of system query options name and values from Olingo's
SystemQueryOption. |
static org.apache.olingo.server.api.uri.UriResource |
getUriLastResourcePart(org.apache.olingo.server.api.uri.UriInfo uriInfo)
Given the URI details, it returns the last URI resource.
|
static String |
getUriPath(List<org.apache.olingo.server.api.uri.UriResource> parts)
Builds a URI path out of the URI segments that are entity set or navigation types.
|
static org.mule.runtime.extension.api.runtime.operation.Result<InputStream,RouteOutputAttributes> |
toResult(org.apache.olingo.server.api.ODataResponse response)
Converts routing response to a runtime operation result.
|
public static APIKitODataResponse getAPIKitResponse(org.apache.olingo.server.api.ODataResponse response)
ODataResponse to routing APIKitODataResponse.response - public static org.mule.runtime.extension.api.runtime.operation.Result<InputStream,RouteOutputAttributes> toResult(org.apache.olingo.server.api.ODataResponse response)
response - public static Optional<org.apache.olingo.commons.api.edm.EdmEntityType> getReturnType(org.apache.olingo.server.api.uri.UriInfo uriInfo)
uriInfo - public static org.apache.olingo.server.api.uri.UriResource getUriLastResourcePart(org.apache.olingo.server.api.uri.UriInfo uriInfo)
uriInfo - public static Optional<String> getEntitySetName(org.apache.olingo.server.api.uri.UriInfo uriInfo)
uriInfo - public static Map<String,String> getEntityTypeKeysFromUriParameters(List<org.apache.olingo.server.api.uri.UriResource> uriResources)
uriResources - public static List<String> getEntityTypeFields(org.apache.olingo.commons.api.edm.EdmEntityType entityType)
entityType - public static String getUriPath(List<org.apache.olingo.server.api.uri.UriResource> parts)
parts - public static RoutingKey getRoutingKey(org.apache.olingo.server.api.ODataRequest request, org.apache.olingo.server.api.uri.UriInfo uriInfo)
RoutingKey based on the request method and the URI segment details.request - uriInfo - public static Map<String,String> getSystemQueryOptions(List<org.apache.olingo.server.api.uri.queryoption.SystemQueryOption> systemQueryOptionOptions)
SystemQueryOption.
The initial dollar sign in option names is removed.
systemQueryOptionOptions - list of Olingo's SystemQueryOptionpublic static org.mule.runtime.api.util.MultiMap<String,String> getCustomQueryOptions(List<org.apache.olingo.server.api.uri.queryoption.CustomQueryOption> customQueryOptions)
CustomQueryOption.customQueryOptions - list of CustomQueryOptionCopyright © 2021 MuleSoft, Inc.. All rights reserved.