Package com.sun.jersey.api.view

Examples of com.sun.jersey.api.view.Viewable


    final List fortunes = new ArrayList(session.createCriteria(Fortune.class).list());
    fortunes.add(new Fortune(0, "Additional fortune added at request time."));
    Collections.sort(fortunes);
   
    session.close();
    return new Viewable("/fortunes.mustache", new Scope(fortunes));
  }
View Full Code Here


    public Response getProcessorIndex() throws CODIException {
        CacheControl cc = new CacheControl();
        cc.setMustRevalidate(true);
        cc.setNoCache(true);
        cc.setNoStore(true);
        return Response.status(Status.OK).cacheControl(cc).entity(new Viewable("/processor/index.jsp", getProcessorList())).build();
    }
View Full Code Here

   
    @Path("/{name}")
    @GET
    @Produces("text/html")
    public Viewable getPage(@PathParam("name") String name) throws CODIException, JAXBException, IOException {
        return new Viewable("/processor/processor.jsp", getProcessor(name));
    }
View Full Code Here

   
    @Path("/{name}")
    @GET
    @Produces(MediaType.TEXT_HTML)
    public Viewable getPage(@PathParam("name") String name) throws CODIException, JAXBException, IOException {
        return new Viewable("/exchange/exchange.jsp", getExchange(name));
    }
View Full Code Here

    public Response getGraphIndex() throws CODIException {
        CacheControl cc = new CacheControl();
        cc.setMustRevalidate(true);
        cc.setNoCache(true);
        cc.setNoStore(true);
        return Response.status(Status.OK).cacheControl(cc).entity(new Viewable("/graph/index.jsp", getGraphList())).build();
    }
View Full Code Here

    @Path("/{name}")
    @GET
    @Produces("text/html")
    public Viewable getPage(@PathParam("name") String name) throws CODIException, JAXBException, IOException {

        return new Viewable("/graph/graph.jsp", getGraph(name));
    }
View Full Code Here

      }
    }

    JSONObject json = JSONObject.fromObject(bookInfo);

    return new Viewable("/bookreader", json.toString());
  }
View Full Code Here

public class Index {
 
  @GET
  @Produces(MediaType.TEXT_HTML)
  public Viewable getIndex(){
    return new Viewable("/index");
  }
View Full Code Here

            return parseRuby(body);
        } else if (language.equals(LANGUAGE_SCALA)) {
            return parseScala(body);
        }
        error = "Not supproted language!";
        return Response.ok(new Viewable("edit", this)).build();

    }
View Full Code Here

            error = "Failed to parse XML: " + e.getMessage();
        } catch (Exception e) {
            error = "Failed to install route: " + e.getMessage();
        }
        // lets re-render the form
        return Response.ok(new Viewable("edit", this)).build();
    }
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.view.Viewable

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.