Package org.apache.olingo.odata2.core
Class ContentNegotiator
java.lang.Object
org.apache.olingo.odata2.core.ContentNegotiator
Handles content negotiation with handling of OData special cases.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoContentNegotiation(ODataRequest odataRequest, UriInfoImpl uriInfo, List<String> supportedContentTypes) Do the content negotiation foraccept header valuebased on requested content type (in HTTP accept header fromODataRequest) in combination with uri information fromUriInfoand from given supported content types (viasupportedContentTypes).
-
Constructor Details
-
ContentNegotiator
public ContentNegotiator()
-
-
Method Details
-
doContentNegotiation
public ContentType doContentNegotiation(ODataRequest odataRequest, UriInfoImpl uriInfo, List<String> supportedContentTypes) throws ODataException Do the content negotiation foraccept header valuebased on requested content type (in HTTP accept header fromODataRequest) in combination with uri information fromUriInfoand from given supported content types (viasupportedContentTypes).- Parameters:
odataRequest- specific requesturiInfo- specific uri informationsupportedContentTypes- list of supported content types- Returns:
- best fitting content type or
NULLif content type is not set and for givenUriInfois ignored - Throws:
ODataException- if no supported content type was foundIllegalArgumentException- if one of the input parameter isNULL
-