Examples of ODataNotAcceptableException


Examples of org.apache.olingo.odata2.api.exception.ODataNotAcceptableException

  private void createNotAcceptableResponse(final HttpServletRequest req, final MessageReference messageReference,
      final HttpServletResponse resp) throws IOException {
    ODataExceptionWrapper exceptionWrapper = new ODataExceptionWrapper(req);
    ODataResponse response =
        exceptionWrapper.wrapInExceptionResponse(new ODataNotAcceptableException(messageReference));
    createResponse(resp, response);

  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.exception.ODataNotAcceptableException

      case XML:
        return new AtomEntityProvider(contentType.getODataFormat());
      case JSON:
        return new JsonEntityProvider();
      default:
        throw new ODataNotAcceptableException(ODataNotAcceptableException.NOT_SUPPORTED_CONTENT_TYPE
            .addContent(contentType));
      }
    } catch (final ODataNotAcceptableException e) {
      throw new EntityProviderException(EntityProviderException.COMMON, e);
    }
View Full Code Here

Examples of org.apache.olingo.odata2.api.exception.ODataNotAcceptableException

  private void createNotAcceptableResponse(final HttpServletRequest req, final MessageReference messageReference,
      final HttpServletResponse resp) throws IOException {
    ODataExceptionWrapper exceptionWrapper = new ODataExceptionWrapper(req);
    ODataResponse response =
        exceptionWrapper.wrapInExceptionResponse(new ODataNotAcceptableException(messageReference));
    createResponse(resp, response);

  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.exception.ODataNotAcceptableException

      case XML:
        return new AtomEntityProvider(contentType.getODataFormat());
      case JSON:
        return new JsonEntityProvider();
      default:
        throw new ODataNotAcceptableException(ODataNotAcceptableException.NOT_SUPPORTED_CONTENT_TYPE
            .addContent(contentType));
      }
    } catch (final ODataNotAcceptableException e) {
      throw new EntityProviderException(EntityProviderException.COMMON, e);
    }
View Full Code Here

Examples of org.apache.olingo.odata2.api.exception.ODataNotAcceptableException

      if (contentType.equals(formatContentType)) {
        return formatContentType;
      }
    }

    throw new ODataNotAcceptableException(ODataNotAcceptableException.NOT_SUPPORTED_CONTENT_TYPE.addContent(uriInfo
        .getFormat()));
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.exception.ODataNotAcceptableException

          return match;
        }
      }
    }

    throw new ODataNotAcceptableException(ODataNotAcceptableException.NOT_SUPPORTED_ACCEPT_HEADER
        .addContent(acceptedContentTypes.toString()));
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.exception.ODataNotAcceptableException

      case XML:
        return new AtomEntityProvider(contentType.getODataFormat());
      case JSON:
        return new JsonEntityProvider();
      default:
        throw new ODataNotAcceptableException(ODataNotAcceptableException.NOT_SUPPORTED_CONTENT_TYPE
            .addContent(contentType));
      }
    } catch (final ODataNotAcceptableException e) {
      throw new EntityProviderException(EntityProviderException.COMMON, e);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.