Package com.linkedin.restli.internal.server

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


  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(StatusCollectionResource.class,
                          RepliesCollectionResource.class,
                          LocationResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, method, resourceClass, methodName, false, "statusID");
  }
View Full Code Here


  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingAssociation")
  public void testRoutingAssociation(String uri, ProtocolVersion version, String httpMethod, ResourceMethod method, String methodName, String[] pathKeys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(FollowsAssociativeResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, method, FollowsAssociativeResource.class, methodName, false, pathKeys);
  }
View Full Code Here

                                    ResourceMethod method,
                                    String methodName,
                                    boolean hasKeys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(DiscoveredItemsResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, restliMethod, method, DiscoveredItemsResource.class, methodName, false, hasKeys? new String[]{"discoveredItemId"} : new String[0]);
  }
View Full Code Here

  @Test(dataProvider = TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "routingSimpleResource")
  public void testRoutingSimpleResource(ProtocolVersion version, String httpMethod, String restliMethod, ResourceMethod method, String methodName) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(TrendingResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult("/trending", version, httpMethod, restliMethod, method, TrendingResource.class, methodName, false);
  }
View Full Code Here

  public void testRoutingSubSimpleResource(String uri, ProtocolVersion version, String httpMethod, ResourceMethod method, String methodName, String[] pathKeys) throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(TrendingResource.class,
                          TrendRegionsCollectionResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri, version, httpMethod, method, TrendRegionsCollectionResource.class, methodName, false, pathKeys);
  }
View Full Code Here

    Map<String, ResourceModel> pathRootResourceMap =
      buildResourceModels(StatusCollectionResource.class,
                          FollowsAssociativeResource.class,
                          RepliesCollectionResource.class);

    _router = new RestLiRouter(pathRootResourceMap);

    expectRoutingException(uri, version, httpMethod, restliMethod);
  }
View Full Code Here

                                                      String[] expectedPathKeys)
    throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(
      CombinedResources.CombinedNKeyAssociationResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri,
                version,
                httpMethod,
                method,
View Full Code Here

                                                      Set<CompoundKey> batchKeys)
    throws Exception
  {
    Map<String, ResourceModel> pathRootResourceMap = buildResourceModels(
      CombinedResources.CombinedNKeyAssociationResource.class);
    _router = new RestLiRouter(pathRootResourceMap);

    checkResult(uri,
                version,
                httpMethod,
                method,
View Full Code Here

    _config = config;
    _errorResponseBuilder = new ErrorResponseBuilder(config.getErrorResponseFormat(), config.getInternalErrorMessage());
    _resourceFactory = resourceFactory;
    _rootResources = new RestLiApiBuilder(config).build();
    _resourceFactory.setRootResources(_rootResources);
    _router = new RestLiRouter(_rootResources);
    _methodInvoker =
        new RestLiMethodInvoker(_resourceFactory, engine, _errorResponseBuilder, config.getRequestFilters());
    _responseHandler =
        new RestLiResponseHandler.Builder().setErrorResponseBuilder(_errorResponseBuilder)
                                           .setPermissiveEncoding(config.getPermissiveEncoding())
View Full Code Here

TOP

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

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.