Package com.linkedin.restli.server

Examples of com.linkedin.restli.server.UpdateResponse


   */
  @Override
  public UpdateResponse update(Greeting greeting)
  {
    GREETING = greeting;
    return new UpdateResponse(HttpStatus.S_204_NO_CONTENT);
  }
View Full Code Here


    {
      PatchApplier.applyPatch(GREETING, patchRequest);
    }
    catch(DataProcessingException e)
    {
      return new UpdateResponse(HttpStatus.S_400_BAD_REQUEST);
    }

    return new UpdateResponse(HttpStatus.S_204_NO_CONTENT);
  }
View Full Code Here

   */
  @Override
  public UpdateResponse delete()
  {
    GREETING = null;
    return new UpdateResponse(HttpStatus.S_204_NO_CONTENT);
  }
View Full Code Here

{
  @Test
  public void testBuilder()
  {
    HttpStatus status = HttpStatus.S_200_OK;
    UpdateResponse updateResponse = new UpdateResponse(status);
    Map<String, String> headers = buildHeaders();

    ResourceMethodDescriptor mockDescriptor = getMockResourceMethodDescriptor();
    RoutingResult routingResult = new RoutingResult(null, mockDescriptor);
View Full Code Here

  }

  @Test
  public void testBuilderException()
  {
    UpdateResponse updateResponse = new UpdateResponse(null);
    Map<String, String> headers = buildHeaders();
    UpdateResponseBuilder updateResponseBuilder = new UpdateResponseBuilder();

    ResourceMethodDescriptor mockDescriptor = getMockResourceMethodDescriptor();
    RoutingResult routingResult = new RoutingResult(null, mockDescriptor);
View Full Code Here

    // make some album entries

    for (int i = 0; i < _entries.length; i++)
    {
      final UpdateResponse uResp = _entryRes.update(_keys[i], _entries[i]);
      Assert.assertEquals(uResp.getStatus(), HttpStatus.S_204_NO_CONTENT);
    }
  }
View Full Code Here

    }
    update.input(generateEntity());
    addParams(update, ResourceMethod.UPDATE);
    addPathKeys(update);
    UpdateRequest<RecordTemplatePlaceholder> request = update.build();
    return buildRequestResponse(request, new UpdateResponse(HttpStatus.S_200_OK), buildResourceMethodDescriptorForRestMethod(request));
  }
View Full Code Here

    }
    update.input(PatchGenerator.<RecordTemplatePlaceholder>diffEmpty(generateEntity()));
    addParams(update, ResourceMethod.PARTIAL_UPDATE);
    addPathKeys(update);
    PartialUpdateRequest<RecordTemplatePlaceholder> request = update.build();
    return buildRequestResponse(request, new UpdateResponse(HttpStatus.S_200_OK), buildResourceMethodDescriptorForRestMethod(request));
  }
View Full Code Here

      delete.id(generateKey());
    }
    addParams(delete, ResourceMethod.DELETE);
    addPathKeys(delete);
    DeleteRequest<RecordTemplatePlaceholder> request = delete.build();
    return buildRequestResponse(request, new UpdateResponse(HttpStatus.S_200_OK), buildResourceMethodDescriptorForRestMethod(request));
  }
View Full Code Here

  }

  private BatchUpdateResult<Object, RecordTemplatePlaceholder> createBatchUpdateResult(Object id1, Object id2)
  {
    Map<Object, UpdateResponse> buResponseData = new HashMap<Object, UpdateResponse>();
    buResponseData.put(id1, new UpdateResponse(HttpStatus.S_200_OK));
    buResponseData.put(id2, new UpdateResponse(HttpStatus.S_200_OK));
    return new BatchUpdateResult<Object, RecordTemplatePlaceholder>(buResponseData);
  }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.server.UpdateResponse

Copyright © 2018 www.massapicom. 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.