Package org.apache.olingo.odata2.core
Class ContentNegotiator
- java.lang.Object
-
- org.apache.olingo.odata2.core.ContentNegotiator
-
public class ContentNegotiator extends Object
Handles content negotiation with handling of OData special cases.
-
-
Constructor Summary
Constructors Constructor Description ContentNegotiator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentTypedoContentNegotiation(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).
-
-
-
Method Detail
-
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
-
-