Package com.linkedin.restli.common

Examples of com.linkedin.restli.common.UpdateStatus


    final Map<Object, UpdateStatus> results =
        new HashMap<Object, UpdateStatus>((int) Math.ceil(mergedKeys.size() / 0.75));

    for (Object key : mergedKeys)
    {
      final UpdateStatus status = new UpdateStatus();

      final UpdateResponse update = updates.get(key);
      if (update != null)
      {
        status.setStatus(update.getStatus().getCode());
      }

      status.setError(errors.get(key), SetMode.IGNORE_NULL);

      results.put(key, status);
    }

    return new AugmentedRestLiResponseData.Builder(routingResult.getResourceMethod().getMethodType()).batchKeyEntityMap(results)
View Full Code Here


    RestLiServiceException restLiServiceException = new RestLiServiceException(HttpStatus.S_404_NOT_FOUND);

    BatchUpdateResult<CompoundKey, Foo> batchUpdateResult = new BatchUpdateResult<CompoundKey, Foo>(results,
                                                                                                    Collections.singletonMap(c3, restLiServiceException));

    UpdateStatus updateStatus = new UpdateStatus().setStatus(202);
    ErrorResponse errorResponse = new ErrorResponse().setStatus(404);

    Map<String, UpdateStatus> expectedProtocol1Results = new HashMap<String, UpdateStatus>();
    expectedProtocol1Results.put("a=a1&b=1", updateStatus);
    expectedProtocol1Results.put("a=a2&b=2", updateStatus);
View Full Code Here

        future.getResponse().getEntity();

    for (Map.Entry<ComplexResourceKey<TwoPartKey, TwoPartKey>, UpdateStatus> resp : response.getResults().entrySet())
    {
      Assert.assertTrue(inputs.containsKey(resp.getKey()));
      final UpdateStatus status = resp.getValue();
      if (status.hasStatus())
      {
        Assert.assertEquals((int) status.getStatus(), 200);
      }
    }

    Assert.assertNotNull(response.getResults().get(key1));
    Assert.assertNotNull(response.getResults().get(key2));
View Full Code Here

TOP

Related Classes of com.linkedin.restli.common.UpdateStatus

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.