private void doWireLogging(ODataRequest request) throws UnsupportedEncodingException { if (LOG.isTraceEnabled()) { LOG.trace("RAW REQUEST LOGGING"); LOG.trace("{} request for URL: {}", request.getMethod().name(), request.getUri()); for (Map.Entry<String, String> headerEntry : request.getHeaders().entrySet()) { LOG.trace("Header: {} value: {}", headerEntry.getKey(), headerEntry.getValue()); } LOG.trace("BODY: {}", request.getBodyText(UTF_8.name())); } } }
private void doWireLogging(ODataRequest request) throws UnsupportedEncodingException { if (LOG.isTraceEnabled()) { LOG.trace("RAW REQUEST LOGGING"); LOG.trace("{} request for URL: {}", request.getMethod().name(), request.getUri()); for (Map.Entry<String, String> headerEntry : request.getHeaders().entrySet()) { LOG.trace("Header: {} value: {}", headerEntry.getKey(), headerEntry.getValue()); } LOG.trace("BODY: {}", request.getBodyText(UTF_8.name())); } } }
public static TargetType getTargetType(ODataRequest request, EntityDataModel entityDataModel, ODataUri oDataUri) throws ODataTargetTypeException { Option<TargetType> targetTypeOption = ODataUriUtil.resolveTargetType(oDataUri, entityDataModel); if (targetTypeOption.isEmpty()) { throw new ODataTargetTypeException("The target type of this URI cannot be determined: " + request.getUri()); } return targetTypeOption.get(); }
public static TargetType getTargetType(ODataRequest request, EntityDataModel entityDataModel, ODataUri oDataUri) throws ODataTargetTypeException { Option<TargetType> targetTypeOption = ODataUriUtil.resolveTargetType(oDataUri, entityDataModel); if (targetTypeOption.isEmpty()) { throw new ODataTargetTypeException("The target type of this URI cannot be determined: " + request.getUri()); } return targetTypeOption.get(); }
protected TargetType getTargetType() throws ODataTargetTypeException { Option<TargetType> targetTypeOption = ODataUriUtil.resolveTargetType(getoDataUri(), getEntityDataModel()); if (targetTypeOption.isEmpty()) { throw new ODataTargetTypeException("The target type of this URI cannot be determined: " + getRequest().getUri()); } return targetTypeOption.get(); }
protected TargetType getTargetType() throws ODataTargetTypeException { Option<TargetType> targetTypeOption = ODataUriUtil.resolveTargetType(getoDataUri(), getEntityDataModel()); if (targetTypeOption.isEmpty()) { throw new ODataTargetTypeException("The target type of this URI cannot be determined: " + getRequest().getUri()); } return targetTypeOption.get(); }
if (!targetTypeOption.isDefined()) { throw new ODataBadRequestException("The target type could not be determined for this query: " + requestContext.getRequest().getUri()); if (strategy == null) { throw new ODataNotImplementedException("This query is not supported: " + requestContext.getRequest().getUri()); throw new ODataDataSourceException("Expected a collection result, but found " + result.getType().name() + " for this query: " + result.getType().name(), requestContext.getRequest().getUri()); if (list.size() == 0) { throw new ODataEntityNotFoundException("Entity not found for this query: " + requestContext.getRequest().getUri()); } else if (list.size() > 1) { throw new ODataDataSourceException("Expected one result, but found multiple for this query: " + requestContext.getRequest().getUri());
if (!targetTypeOption.isDefined()) { throw new ODataBadRequestException("The target type could not be determined for this query: " + requestContext.getRequest().getUri()); if (strategy == null) { throw new ODataNotImplementedException("This query is not supported: " + requestContext.getRequest().getUri()); throw new ODataDataSourceException("Expected a collection result, but found " + result.getType().name() + " for this query: " + result.getType().name(), requestContext.getRequest().getUri()); if (list.size() == 0) { throw new ODataEntityNotFoundException("Entity not found for this query: " + requestContext.getRequest().getUri()); } else if (list.size() > 1) { throw new ODataDataSourceException("Expected one result, but found multiple for this query: " + requestContext.getRequest().getUri());
throw new ODataBadRequestException("The URI of a " + requestContext.getRequest().getMethod() + " request to create a link must refer to a navigation property of a specific entity." + " This information could not be determined from the URI: " + requestContext.getRequest().getUri());
throw new ODataBadRequestException("The URI of a " + requestContext.getRequest().getMethod() + " request to create a link must refer to a navigation property of a specific entity." + " This information could not be determined from the URI: " + requestContext.getRequest().getUri());
"navigation property of a specific entity. " + "This information could not be determined from the URI: " + requestContext.getRequest().getUri());
"navigation property of a specific entity. " + "This information could not be determined from the URI: " + requestContext.getRequest().getUri());