processorFeature = EntityLinkProcessor.class; // The request must contain a single link!
}
final ContentType parsedContentType = ContentType.parse(contentType);
if (parsedContentType == null || parsedContentType.hasWildcard()) {
throw new ODataUnsupportedMediaTypeException(ODataUnsupportedMediaTypeException.NOT_SUPPORTED
.addContent(parsedContentType));
}
// Get list of supported content types based on processor feature.
final List<ContentType> supportedContentTypes =
processorFeature == EntitySimplePropertyValueProcessor.class ? getSupportedContentTypes(getProperty(uriInfo))
: getSupportedContentTypes(processorFeature);
if (!hasMatchingContentType(parsedContentType, supportedContentTypes)) {
throw new ODataUnsupportedMediaTypeException(ODataUnsupportedMediaTypeException.NOT_SUPPORTED
.addContent(parsedContentType));
}
}