Package com.google.greaze.definition.rest

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


      .build();
    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>(
View Full Code Here


      RestCallSpec callSpec, GsonBuilder gsonBuilder, boolean inlined) {
    this.stub = stub;
    this.callSpec = callSpec;
    this.resourceType = resourceType;
    this.gson = callSpec.addTypeAdapters(gsonBuilder)
        .registerTypeAdapterFactory(new IdGsonTypeAdapterFactory())
        .create();
    this.inlined = inlined;
  }
View Full Code Here

  @Singleton
  @Provides
  public GsonBuilder getGsonBuilder() {
    return new GsonBuilder()
      .setVersion(SampleJsonService.CURRENT_VERSION)
      .registerTypeAdapterFactory(new IdGsonTypeAdapterFactory())
      .registerTypeAdapter(MetaData.class, new MetaDataBase.GsonTypeAdapter());
  }
View Full Code Here

      Type queryType, GsonBuilder gsonBuilder, Type resourceType, WebContextSpec webContextSpec,
      boolean inlined) {
    this.stub = stub;
    this.callSpec = callSpec;
    this.gson = callSpec.addTypeAdapters(gsonBuilder)
        .registerTypeAdapterFactory(new IdGsonTypeAdapterFactory())
        .create();
    this.queryType = queryType;
    this.resourceType = resourceType;
    this.webContextSpec = webContextSpec;
    this.inlined = inlined;
View Full Code Here

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    Gson gson = new GsonBuilder()
      .registerTypeAdapterFactory(new IdGsonTypeAdapterFactory())
      .create();
    this.upBuilder = new UrlParamStringBuilder(gson);
  }
View Full Code Here

      .build();
    ResponseBuilderMap responseBuilders = new ResponseBuilderMap.Builder()
      .set(Employee.class, responseBuilder)
      .build();
    GsonBuilder gsonBuilder = new GsonBuilder()
      .registerTypeAdapterFactory(new IdGsonTypeAdapterFactory());
    RestClientStub stub = new RestClientStubFake(responseBuilders,
        restCallSpecMap, gsonBuilder, ImmutableList.of(resourcePath), urlPaths, null);
    this.client = new ResourceDepotClient<Employee>(
        stub, Employee.class, callSpec, new GsonBuilder(), true);
    this.context = new WebContext.Builder()
View Full Code Here

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    gson = new GsonBuilder()
      .registerTypeAdapterFactory(new IdGsonTypeAdapterFactory())
      .create();
    this.urlParamBuilder = new UrlParamStringBuilder(gson);
  }
View Full Code Here

  private ResourceUrlPaths urlPaths;

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    this.gsonBuilder = new GsonBuilder().registerTypeAdapterFactory(new IdGsonTypeAdapterFactory());
    this.employees = new RepositoryInMemory<Employee>();
    this.queryHandler = new QueryHandlerEmployee(employees);

    CallPath queryPath =
        new CallPathParser("/rest", true, "/employee").parse("/rest/1.2/employee");
View Full Code Here

    return new Provider<GsonBuilder>() {
      @Override
      public GsonBuilder get() {
        return new GsonBuilder()
          .setVersion(SampleJsonService.CURRENT_VERSION)
          .registerTypeAdapterFactory(new IdGsonTypeAdapterFactory())
          .registerTypeAdapter(MetaData.class, new MetaDataBase.GsonTypeAdapter());
      }
    };
  }
View Full Code Here

TOP

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

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.