/** * Validates that <code>dollar format query/syntax</code> is correct for further processing. * If some validation error occurs an exception is thrown. * * @param uriInfo * @throws ODataBadRequestException */ private void validateFormatQuery(final UriInfoImpl uriInfo) throws ODataBadRequestException { if (uriInfo.isValue()) { throw new ODataBadRequestException(ODataBadRequestException.INVALID_SYNTAX); } }
/** * Validates that <code>dollar format query/syntax</code> is correct for further processing. * If some validation error occurs an exception is thrown. * * @param uriInfo * @throws ODataBadRequestException */ private void validateFormatQuery(final UriInfoImpl uriInfo) throws ODataBadRequestException { if (uriInfo.isValue()) { throw new ODataBadRequestException(ODataBadRequestException.INVALID_SYNTAX); } }
/** * Validates that <code>dollar format query/syntax</code> is correct for further processing. * If some validation error occurs an exception is thrown. * * @param uriInfo * @throws ODataBadRequestException */ private void validateFormatQuery(final UriInfoImpl uriInfo) throws ODataBadRequestException { if (uriInfo.isValue()) { throw new ODataBadRequestException(ODataBadRequestException.INVALID_SYNTAX); } }
private void checkSystemQueryOptionsCompatibility() throws UriSyntaxException { final UriType uriType = uriResult.getUriType(); for (SystemQueryOption queryOption : systemQueryOptions.keySet()) { if (queryOption == SystemQueryOption.$format && (uriType == UriType.URI4 || uriType == UriType.URI5) && uriResult.isValue()) { throw new UriSyntaxException(UriSyntaxException.INCOMPATIBLESYSTEMQUERYOPTION.addContent(queryOption)); } if (!uriType.isCompatible(queryOption)) { throw new UriSyntaxException(UriSyntaxException.INCOMPATIBLESYSTEMQUERYOPTION.addContent(queryOption)); } } }
private void checkSystemQueryOptionsCompatibility() throws UriSyntaxException { final UriType uriType = uriResult.getUriType(); for (SystemQueryOption queryOption : systemQueryOptions.keySet()) { if (queryOption == SystemQueryOption.$format && (uriType == UriType.URI4 || uriType == UriType.URI5) && uriResult.isValue()) { throw new UriSyntaxException(UriSyntaxException.INCOMPATIBLESYSTEMQUERYOPTION.addContent(queryOption)); } if (!uriType.isCompatible(queryOption)) { throw new UriSyntaxException(UriSyntaxException.INCOMPATIBLESYSTEMQUERYOPTION.addContent(queryOption)); } } }
private void checkSystemQueryOptionsCompatibility() throws UriSyntaxException { final UriType uriType = uriResult.getUriType(); for (SystemQueryOption queryOption : systemQueryOptions.keySet()) { if (queryOption == SystemQueryOption.$format && (uriType == UriType.URI4 || uriType == UriType.URI5) && uriResult.isValue()) { throw new UriSyntaxException(UriSyntaxException.INCOMPATIBLESYSTEMQUERYOPTION.addContent(queryOption)); } if (!uriType.isCompatible(queryOption)) { throw new UriSyntaxException(UriSyntaxException.INCOMPATIBLESYSTEMQUERYOPTION.addContent(queryOption)); } } }
} else if (uriInfo.isValue()) { if (uriInfo.getUriType() == UriType.URI5 || uriInfo.getUriType() == UriType.URI4) { return ContentType.TEXT_PLAIN_CS_UTF_8;
} else if (uriInfo.isValue()) { if (uriInfo.getUriType() == UriType.URI5 || uriInfo.getUriType() == UriType.URI4) { return ContentType.TEXT_PLAIN_CS_UTF_8;
} else if (uriInfo.isValue()) { if (uriInfo.getUriType() == UriType.URI5 || uriInfo.getUriType() == UriType.URI4) { return ContentType.TEXT_PLAIN_CS_UTF_8;
} else { EdmProperty property = ((UriInfoImpl) resultsView).getPropertyPath().get(0); if (((UriInfoImpl) resultsView).isValue()) { odataResponse = EntityProvider.writePropertyValue(property, edmPropertyValueMap.get(property.getName()));
case URI5: if (method == ODataHttpMethod.PUT || method == ODataHttpMethod.PATCH || method == ODataHttpMethod.MERGE) { if (!uriInfo.isValue() && uriInfo.getFormat() != null) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH);
case URI5: if (method == ODataHttpMethod.PUT || method == ODataHttpMethod.PATCH || method == ODataHttpMethod.MERGE) { if (!uriInfo.isValue() && uriInfo.getFormat() != null) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH);
case URI5: if (method == ODataHttpMethod.PUT || method == ODataHttpMethod.PATCH || method == ODataHttpMethod.MERGE) { if (!uriInfo.isValue() && uriInfo.getFormat() != null) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH);
&& method != ODataHttpMethod.PATCH && method != ODataHttpMethod.MERGE) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH); } else if (method == ODataHttpMethod.DELETE && !uriInfo.isValue()) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH);
&& method != ODataHttpMethod.PATCH && method != ODataHttpMethod.MERGE) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH); } else if (method == ODataHttpMethod.DELETE && !uriInfo.isValue()) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH);
&& method != ODataHttpMethod.PATCH && method != ODataHttpMethod.MERGE) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH); } else if (method == ODataHttpMethod.DELETE && !uriInfo.isValue()) { throw new ODataMethodNotAllowedException(ODataMethodNotAllowedException.DISPATCH);
switch (method) { case GET: if (uriInfo.isValue()) { return service.getEntitySimplePropertyValueProcessor().readEntitySimplePropertyValue(uriInfo, contentType); } else { case PATCH: case MERGE: if (uriInfo.isValue()) { return service.getEntitySimplePropertyValueProcessor().updateEntitySimplePropertyValue(uriInfo, content, requestContentType, contentType); if (uriInfo.isValue()) { return service.getEntitySimplePropertyValueProcessor().deleteEntitySimplePropertyValue(uriInfo, contentType); } else { if (uriInfo.isValue()) { return service.getFunctionImportValueProcessor().executeFunctionImportValue(uriInfo, contentType); } else {