Package org.jboss.resteasy.examples.data

Examples of org.jboss.resteasy.examples.data.BookListing


   @GET
   @Path("books/badger.html")
   @Produces("text/html")
   public String getBooksBadgerText() throws Exception
   {
      BookListing listing = getListing();
      BadgerContext context = new BadgerContext(BookListing.class);
      StringWriter writer = new StringWriter();
      Marshaller marshaller = context.createMarshaller();
      marshaller.marshal(listing, writer);
      return writer.toString();
View Full Code Here


   @GET
   @Path("books/mapped.html")
   @Produces("text/html")
   public String getBooksMappedText() throws Exception
   {
      BookListing listing = getListing();
      JettisonMappedContext context = new JettisonMappedContext(BookListing.class);
      StringWriter writer = new StringWriter();
      Marshaller marshaller = context.createMarshaller();
      marshaller.marshal(listing, writer);
      return writer.toString();
View Full Code Here

   private BookListing getListing()
   {
      ArrayList<Book> list = new ArrayList<Book>();
      list.addAll(books.values());
      return new BookListing(list);
   }
View Full Code Here

   @GET
   @Path("/books/badger.html")
   @Produces("text/html")
   public String getBooksBadgerText() throws Exception
   {
      BookListing listing = getListing();
      BadgerContext context = new BadgerContext(BookListing.class);
      StringWriter writer = new StringWriter();
      Marshaller marshaller = context.createMarshaller();
      marshaller.marshal(listing, writer);
      return writer.toString();
View Full Code Here

   @GET
   @Path("/books/mapped.html")
   @Produces("text/html")
   public String getBooksMappedText() throws Exception
   {
      BookListing listing = getListing();
      JettisonMappedContext context = new JettisonMappedContext(BookListing.class);
      StringWriter writer = new StringWriter();
      Marshaller marshaller = context.createMarshaller();
      marshaller.marshal(listing, writer);
      return writer.toString();
View Full Code Here

   private BookListing getListing()
   {
      ArrayList<Book> list = new ArrayList<Book>();
      list.addAll(books.values());
      return new BookListing(list);
   }
View Full Code Here

   @GET
   @Path("books/badger.html")
   @Produces("text/html")
   public String getBooksBadgerText() throws Exception
   {
      BookListing listing = getListing();
      BadgerContext context = new BadgerContext(BookListing.class);
      StringWriter writer = new StringWriter();
      Marshaller marshaller = context.createMarshaller();
      marshaller.marshal(listing, writer);
      return writer.toString();
View Full Code Here

   @GET
   @Path("books/mapped.html")
   @Produces("text/html")
   public String getBooksMappedText() throws Exception
   {
      BookListing listing = getListing();
      JettisonMappedContext context = new JettisonMappedContext(BookListing.class);
      StringWriter writer = new StringWriter();
      Marshaller marshaller = context.createMarshaller();
      marshaller.marshal(listing, writer);
      return writer.toString();
View Full Code Here

   private BookListing getListing()
   {
      ArrayList<Book> list = new ArrayList<Book>();
      list.addAll(books.values());
      return new BookListing(list);
   }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.examples.data.BookListing

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.