Examples of ODataResponse


Examples of org.apache.olingo.odata2.api.processor.ODataResponse

  public ODataResponse updateEntity(final PutMergePatchUriInfo uriParserResultView, final InputStream content,
      final String requestContentType, final boolean merge, final String contentType) throws ODataException {

    Object jpaEntity = jpaProcessor.process(uriParserResultView, content, requestContentType);

    ODataResponse oDataResponse = responseBuilder.build(uriParserResultView, jpaEntity);

    return oDataResponse;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

  public ODataResponse deleteEntity(final DeleteUriInfo uriParserResultView, final String contentType)
      throws ODataException {

    Object deletedObj = jpaProcessor.process(uriParserResultView, contentType);

    ODataResponse oDataResponse = responseBuilder.build(uriParserResultView, deletedObj);
    return oDataResponse;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

  public ODataResponse executeFunctionImport(final GetFunctionImportUriInfo uriParserResultView,
      final String contentType) throws ODataException {

    List<Object> resultEntity = jpaProcessor.process(uriParserResultView);

    ODataResponse oDataResponse =
        responseBuilder.build(uriParserResultView, resultEntity, contentType);

    return oDataResponse;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

  public ODataResponse executeFunctionImportValue(final GetFunctionImportUriInfo uriParserResultView,
      final String contentType) throws ODataException {

    List<Object> result = jpaProcessor.process(uriParserResultView);

    ODataResponse oDataResponse =
        responseBuilder.build(uriParserResultView, result, contentType);

    return oDataResponse;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

  public ODataResponse readEntityLink(final GetEntityLinkUriInfo uriParserResultView, final String contentType)
      throws ODataException {

    Object jpaEntity = jpaProcessor.process(uriParserResultView);

    ODataResponse oDataResponse =
        responseBuilder.build(uriParserResultView, jpaEntity, contentType);

    return oDataResponse;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

  public ODataResponse readEntityLinks(final GetEntitySetLinksUriInfo uriParserResultView, final String contentType)
      throws ODataException {

    List<Object> jpaEntity = jpaProcessor.process(uriParserResultView);

    ODataResponse oDataResponse =
        responseBuilder.build(uriParserResultView, jpaEntity, contentType);

    return oDataResponse;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

  }

  @Override
  public ODataResponse executeBatch(final BatchHandler handler, final String contentType, final InputStream content)
      throws ODataException {
    ODataResponse batchResponse;
    List<BatchResponsePart> batchResponseParts = new ArrayList<BatchResponsePart>();
    PathInfo pathInfo = getContext().getPathInfo();
    EntityProviderBatchProperties batchProperties = EntityProviderBatchProperties.init().pathInfo(pathInfo).build();
    List<BatchRequestPart> batchParts = EntityProvider.parseBatchRequest(contentType, content, batchProperties);
    for (BatchRequestPart batchPart : batchParts) {
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

  @Override
  public BatchResponsePart executeChangeSet(final BatchHandler handler, final List<ODataRequest> requests)
      throws ODataException {
    List<ODataResponse> responses = new ArrayList<ODataResponse>();
    for (ODataRequest request : requests) {
      ODataResponse response = handler.handleRequest(request);
      if (response.getStatus().getStatusCode() >= HttpStatusCodes.BAD_REQUEST.getStatusCode()) {
        // Rollback
        List<ODataResponse> errorResponses = new ArrayList<ODataResponse>(1);
        errorResponses.add(response);
        return BatchResponsePart.responses(errorResponses).changeSet(false).build();
      }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

    context.setPathInfo(request.getPathInfo());
    context.setServiceFactory(serviceFactory);
    context.setParameter(ODataContext.HTTP_SERVLET_REQUEST_OBJECT, httpRequest);
    ODataExceptionWrapper exceptionWrapper =
        new ODataExceptionWrapper(context, request.getQueryParameters(), request.getAcceptHeaders());
    ODataResponse response =
        exceptionWrapper.wrapInExceptionResponse(new ODataNotImplementedException(messageReference));
    return RestUtil.convertResponse(response);
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse

    service.getProcessor().setContext(context);
    context.setService(service);

    ODataRequestHandler requestHandler = new ODataRequestHandler(serviceFactory, service, context);

    final ODataResponse odataResponse = requestHandler.handle(request);
    final Response response = RestUtil.convertResponse(odataResponse);

    return response;
  }
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.