public static MessageReference getMessageReference(final MessageReference messageReference) { if (EdmSimpleTypeException.VALUE_NULL_NOT_ALLOWED.equals(messageReference)) { return EdmSimpleTypeException.PROPERTY_VALUE_NULL_NOT_ALLOWED; } else if (EdmSimpleTypeException.VALUE_FACETS_NOT_MATCHED.equals(messageReference)) { return EdmSimpleTypeException.PROPERTY_VALUE_FACETS_NOT_MATCHED; } return messageReference; } }
public static MessageReference getMessageReference(final MessageReference messageReference) { if (EdmSimpleTypeException.VALUE_NULL_NOT_ALLOWED.equals(messageReference)) { return EdmSimpleTypeException.PROPERTY_VALUE_NULL_NOT_ALLOWED; } else if (EdmSimpleTypeException.VALUE_FACETS_NOT_MATCHED.equals(messageReference)) { return EdmSimpleTypeException.PROPERTY_VALUE_FACETS_NOT_MATCHED; } return messageReference; } }
public static MessageReference getMessageReference(final MessageReference messageReference) { if (EdmSimpleTypeException.VALUE_NULL_NOT_ALLOWED.equals(messageReference)) { return EdmSimpleTypeException.PROPERTY_VALUE_NULL_NOT_ALLOWED; } else if (EdmSimpleTypeException.VALUE_FACETS_NOT_MATCHED.equals(messageReference)) { return EdmSimpleTypeException.PROPERTY_VALUE_FACETS_NOT_MATCHED; } return messageReference; } }
private static UriSyntaxException convertEdmLiteralException(final EdmLiteralException e) { final MessageReference messageReference = e.getMessageReference(); if (EdmLiteralException.LITERALFORMAT.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.LITERALFORMAT.addContent(messageReference.getContent()), e); } else if (EdmLiteralException.NOTEXT.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.NOTEXT.addContent(messageReference.getContent()), e); } else if (EdmLiteralException.UNKNOWNLITERAL.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.UNKNOWNLITERAL.addContent(messageReference.getContent()), e); } else { return new UriSyntaxException(ODataBadRequestException.COMMON, e); } }
private static UriSyntaxException convertEdmLiteralException(final EdmLiteralException e) { final MessageReference messageReference = e.getMessageReference(); if (EdmLiteralException.LITERALFORMAT.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.LITERALFORMAT.addContent(messageReference.getContent()), e); } else if (EdmLiteralException.NOTEXT.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.NOTEXT.addContent(messageReference.getContent()), e); } else if (EdmLiteralException.UNKNOWNLITERAL.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.UNKNOWNLITERAL.addContent(messageReference.getContent()), e); } else { return new UriSyntaxException(ODataBadRequestException.COMMON, e); } }
private static UriSyntaxException convertEdmLiteralException(final EdmLiteralException e) { final MessageReference messageReference = e.getMessageReference(); if (EdmLiteralException.LITERALFORMAT.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.LITERALFORMAT.addContent(messageReference.getContent()), e); } else if (EdmLiteralException.NOTEXT.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.NOTEXT.addContent(messageReference.getContent()), e); } else if (EdmLiteralException.UNKNOWNLITERAL.equals(messageReference)) { return new UriSyntaxException(UriSyntaxException.UNKNOWNLITERAL.addContent(messageReference.getContent()), e); } else { return new UriSyntaxException(ODataBadRequestException.COMMON, e); } }
}else if (exception instanceof ODataHttpException){ statusCode = ((ODataHttpException) exception).getHttpStatus().getStatusCode(); if(((ODataHttpException) exception).getMessageReference().equals(ODataInternalServerErrorException.NOSERVICE)) {