Package com.linkedin.restli.internal.server

Examples of com.linkedin.restli.internal.server.MutablePathKeys


    repliesResource = getMockResource(RepliesCollectionResource.class);
    repliesResource.replyToAll("hello");
    EasyMock.expectLastCall().once();

    String jsonEntityBody = RestLiTestHelper.doubleQuote("{'status': 'hello'}");
    MutablePathKeys pathKeys = new PathKeysImpl();
    pathKeys.append("statusID", 1L);
    checkInvocation(repliesResource,
                    methodDescriptor,
                    "POST",
                    version,
                    "/statuses/1/replies?action=replyToAll",
                    jsonEntityBody,
                    pathKeys);

    // #2 Action on simple resource
    methodDescriptor = locationResourceModel.findActionMethod("new_status_from_location", ResourceLevel.ENTITY);
    locationResource = getMockResource(LocationResource.class);
    locationResource.newStatusFromLocation(eq("hello"));
    EasyMock.expectLastCall().once();

    jsonEntityBody = RestLiTestHelper.doubleQuote("{'status': 'hello'}");
    pathKeys = new PathKeysImpl();
    pathKeys.append("statusID", 1L);
    checkInvocation(locationResource, methodDescriptor, "POST",
                    version,
                    "/statuses/1/location?action=new_status_from_location",
                    jsonEntityBody, pathKeys);
View Full Code Here


    final ResourceMethod methodType = ResourceMethod.GET;
    final DataMap customAnnotations = new DataMap();
    customAnnotations.put("foo", "Bar");
    final ProjectionMode projectionMode = ProjectionMode.AUTOMATIC;
    final MaskTree maskTree = new MaskTree();
    final MutablePathKeys pathKeys = new PathKeysImpl();
    final Map<String, String> requestHeaders = new HashMap<String, String>();
    requestHeaders.put("Key1", "Value1");
    final URI requestUri = new URI("foo.bar.com");
    final ProtocolVersion protoVersion = AllProtocolVersions.BASELINE_PROTOCOL_VERSION;
    final DataMap queryParams = new DataMap();
View Full Code Here

  // Helper methods
  // *****************

  private MutablePathKeys buildPathKeys(Object... pathKeyValues) throws RestLiSyntaxException
  {
    MutablePathKeys result = new PathKeysImpl();
    for (int i = 0; i < pathKeyValues.length; i += 2)
    {
      result.append((String) pathKeyValues[i], pathKeyValues[i + 1]);
    }

    return result;
  }
View Full Code Here

    return result;
  }

  public MutablePathKeys buildBatchPathKeys(Object... batchKeys) throws RestLiSyntaxException
  {
    MutablePathKeys result = new PathKeysImpl();
    Set<Object> keys = new HashSet<Object>();

    for (Object batchKey : batchKeys)
    {
      keys.add(batchKey);
    }

    result.setBatchKeys(keys);
    return result;
  }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.internal.server.MutablePathKeys

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.