Package com.google.greaze.definition.rest

Examples of com.google.greaze.definition.rest.ResourceUrlPaths


    ResponseBuilderMap responseBuilders = new ResponseBuilderMap.Builder()
      .set(Employee.class, responseBuilder)
      .build();
    GsonBuilder gsonBuilder = new GsonBuilder()
      .registerTypeAdapterFactory(new IdGsonTypeAdapterFactory());
    ResourceUrlPaths urlPaths = new ResourceUrlPaths("http://localhost/fake/service/rest",
        "/fake", "/service", RESOURCE_PREFIX);
    RestClientStub stub = new RestClientStubFake(responseBuilders,
        restCallSpecMap, gsonBuilder, ImmutableList.of(RESOURCE_PATH), urlPaths, null);
    this.client = new ResourceDepotClient<Employee>(
        stub, RESOURCE_PATH, Employee.class, new GsonBuilder(), false);
View Full Code Here


  private HttpServletRequestFake req2;

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    ResourceUrlPaths urlPaths1 = new ResourceUrlPaths(
        "http://localhost:8080/fake/abcd/resource/",
        "/fake", "/abcd", "/resource");
    this.req1 = new HttpServletRequestFake()
      .setResourceUrlPaths(new URL("http://localhost:8080/fake/abcd/resource/1.0/order/232?abc=def"),
          urlPaths1);
    ResourceUrlPaths urlPaths2 = new ResourceUrlPaths(
        "https://localhost/fake2/abcd/resource/",
        "/fake2", "/abcd", "/resource");
    this.req2 = new HttpServletRequestFake()
      .setResourceUrlPaths(new URL("https://localhost/fake2/abcd/resource/1.0/order/121?abc=def"),
          urlPaths2);
View Full Code Here

  protected void setUp() throws Exception {
    super.setUp();
    String resourcePrefix = "/rest";
    CallPath resourcePath = new CallPathParser(
        resourcePrefix, false, "/employee").parse(resourcePrefix + "/employee");
    ResourceUrlPaths urlPaths = new ResourceUrlPaths("http://localhost/fake/service/rest",
        "/fake", "/service", resourcePrefix);

    this.employees = new RepositoryInMemory<Employee>();
    RestResponseBuilder<Employee> responseBuilder = new ResponseBuilderEmployee(employees);
    HeaderMapSpec contextHeaderSpec = new HeaderMapSpec.Builder()
View Full Code Here

    this.employees = new RepositoryInMemory<Employee>();
    this.queryHandler = new QueryHandlerEmployee(employees);

    CallPath queryPath =
        new CallPathParser("/rest", true, "/employee").parse("/rest/1.2/employee");
    this.urlPaths = new ResourceUrlPaths("http://localhost/fake/service/rest",
        "/fake", "/service", "/rest");
    ResourceQueryClientFake<Employee, QueryEmployeeByName> stub =
      new ResourceQueryClientFake<Employee, QueryEmployeeByName>(queryHandler, gsonBuilder,
          urlPaths, queryPath, null);
    this.queryClient = new ResourceQueryClient<Employee, QueryEmployeeByName>(
View Full Code Here

TOP

Related Classes of com.google.greaze.definition.rest.ResourceUrlPaths

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.