Package com.linkedin.restli.internal.server

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


                                             Map<String, String> headers,
                                             ProtocolVersion protocolVersion)
          throws IOException, URISyntaxException, RestLiSyntaxException
  {
    RestRequest request = buildRequest(uri, headers, protocolVersion);
    ServerResourceContext context = new ResourceContextImpl(new PathKeysImpl(), request, new RequestContext());
    RestUtils.validateRequestHeadersAndUpdateResourceContext(headers, context);
    RoutingResult routingResult = new RoutingResult(context, methodDescriptor);
    RestResponse response;
    response = _responseHandler.buildResponse(request,
                                              routingResult,
View Full Code Here


                                                     InterfaceType.SYNC,
                                                     new DataMap());

    model.addResourceMethodDescriptor(methodDescriptor);

    ServerResourceContext resourceContext = new ResourceContextImpl(new PathKeysImpl(), request, new RequestContext());
    RestUtils.validateRequestHeadersAndUpdateResourceContext(headers, resourceContext);
    return new RoutingResult(resourceContext, methodDescriptor);
  }
View Full Code Here

    Method method = ProjectionTestFixture.class.getMethod("batchGet", Set.class);
    ResourceModel model = RestLiTestHelper.buildResourceModel(StatusCollectionResource.class);
    ResourceMethodDescriptor methodDescriptor =
        ResourceMethodDescriptor.createForRestful(resourceMethod, method, InterfaceType.SYNC);
    model.addResourceMethodDescriptor(methodDescriptor);
    ServerResourceContext context =  new ResourceContextImpl(new PathKeysImpl(), request,
                            new RequestContext());
    RestUtils.validateRequestHeadersAndUpdateResourceContext(acceptHeaders, context);
    return new RoutingResult(context, methodDescriptor);
  }
View Full Code Here

    Method method = ProjectionTestFixture.class.getMethod("find");
    ResourceModel model = RestLiTestHelper.buildResourceModel(StatusCollectionResource.class);
    ResourceMethodDescriptor methodDescriptor =
        ResourceMethodDescriptor.createForRestful(ResourceMethod.FINDER, method, InterfaceType.SYNC);
    model.addResourceMethodDescriptor(methodDescriptor);
    ServerResourceContext context = new ResourceContextImpl(new PathKeysImpl(), request, new RequestContext());
    RestUtils.validateRequestHeadersAndUpdateResourceContext(acceptHeaders, context);
    return new RoutingResult(context, methodDescriptor);
  }
View Full Code Here

  {
    URI uri = URI.create(stringUri);
    Map<String, String> headers = new HashMap<String, String>(1);
    headers.put(RestConstants.HEADER_RESTLI_PROTOCOL_VERSION, version.toString());

    ResourceContext context = new ResourceContextImpl(new PathKeysImpl(),
                                                      new MockRequest(uri, headers),
                                                      new RequestContext());
    final MaskTree rootEntityMask = context.getProjectionMask();
    Assert.assertEquals(rootEntityMask.toString(), "{locale=1, state=1}");
View Full Code Here

  {
    URI uri = URI.create(stringUri);
    Map<String, String> headers = new HashMap<String, String>(1);
    headers.put(RestConstants.HEADER_RESTLI_PROTOCOL_VERSION, version.toString());

    ResourceContext context = new ResourceContextImpl(new PathKeysImpl(),
                                                      new MockRequest(uri, headers),
                                                      new RequestContext());
    final MaskTree rootEntityMask = context.getProjectionMask();
    Assert.assertEquals(rootEntityMask.toString(), "{location={longitude=1, latitude=1}, locale=1, state=1}");
View Full Code Here

  {
    URI uri = URI.create(stringUri);
    Map<String, String> headers = new HashMap<String, String>(1);
    headers.put(RestConstants.HEADER_RESTLI_PROTOCOL_VERSION, version.toString());

    ResourceContext context = new ResourceContextImpl(new PathKeysImpl(),
                                                      new MockRequest(uri, headers),
                                                      new RequestContext());
    final MaskTree rootEntityMask = context.getProjectionMask();
    Assert.assertEquals(rootEntityMask.toString(), "{d={$*={f=1, e=1}}, b={$*={c=1}}, a={$*=1}}");

 
View Full Code Here

  {
    URI uri = URI.create(stringUri);
    Map<String, String> headers = new HashMap<String, String>(1);
    headers.put(RestConstants.HEADER_RESTLI_PROTOCOL_VERSION, version.toString());

    ServerResourceContext context = new ResourceContextImpl(new PathKeysImpl(),
                                                            new MockRequest(uri, headers),
                                                            new RequestContext());

    final MaskTree rootEntityMask = context.getProjectionMask();
    Assert.assertEquals(rootEntityMask.toString(), "{baz=1, foo=1, bar=1}");
View Full Code Here

                new Object[]{new PagingContext(33, 444), new Integer(777), "someString"}
            },
            {
                finderWithAssocKeyParams,
                null,
                new PathKeysImpl().append("string1", "testString"),
                new Object[]{"testString"}
            }
        };
  }
View Full Code Here

    @SuppressWarnings({"unchecked", "rawtypes"})
    Parameter<?> param = new Parameter("",
                                       paramType,
                                       null,
                                       optional != null,
                                       new PathKeysImpl(),
                                       parameter,
                                       false,
                                       annotations);
    return param;
  }
View Full Code Here

TOP

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

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.