Package br.com.caelum.restfulie.mediatype

Examples of br.com.caelum.restfulie.mediatype.XmlMediaType


      new URL("http://localhost:3000").openStream();
    } catch (IOException e) {
      Assume.assumeNoException(e);
    }
    restfulie = Restfulie.custom();
    XmlMediaType mediaType = new XmlMediaType().withTypes(SearchDescription.class, Url.class, Tags.class,
        Product.class, Order.class, Item.class, Payment.class);
    mediaType.withCollectionName("products");
    restfulie.getMediaTypes().register(mediaType);
  }
View Full Code Here


  @Before
  public void setUp() throws Exception {
    restfulie = Restfulie.custom();
    restfulie.getMediaTypes().register(
        new XmlMediaType().withTypes(Item.class, Basket.class, Payment.class)
    );
  }
View Full Code Here

  private RestClient client = mock(RestClient.class);

  @Before
  public void setup() {
    Locale.setDefault(Locale.ENGLISH);
    mediaType = new XmlMediaType().withTypes(Order.class);
    when(client.inflectionRules()).thenReturn(new NounPluralizer());
  }
View Full Code Here

  private RestClient restfulie;

  @Before
  public void setUp() throws Exception {
    restfulie = Restfulie.custom();
    restfulie.getMediaTypes().register(new XmlMediaType().withTypes(Item.class));
  }
View Full Code Here

  public DefaultRestClient()
  {
    this.dispatcher = new ApacheDispatcher(this);
    this.inflector = new NounPluralizer();
    types.register(new XmlMediaType());
    types.register(new JsonMediaType());
    types.register(new FormEncoded());
  }
View Full Code Here

  public DefaultRestClient()
  {
    this.dispatcher = new ApacheDispatcher(this);
    this.inflector = new NounPluralizer();
    types.register(new XmlMediaType());
    types.register(new JsonMediaType());
    types.register(new FormEncoded());
  }
View Full Code Here

 
  public DefaultRestClient(Enhancer enhancer)
  {
    this.dispatcher = new ApacheDispatcher(this);
    this.inflector = new NounPluralizer();
    types.register(new XmlMediaType(enhancer));
    types.register(new JsonMediaType(enhancer));
    types.register(new FormEncoded());
    this.threads = Executors.newCachedThreadPool();
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.restfulie.mediatype.XmlMediaType

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.