org.glassfish.jersey.examples.shortener.webapp.resource
Class ShortenerResource
java.lang.Object
org.glassfish.jersey.examples.shortener.webapp.resource.ShortenerResource
@Path(value="/")
public class ShortenerResource
- extends Object
Resource responsible of providing a form to create shortened link (see form()) and shortening posted link
(see createLink(String)). Client is shown error-404 page if the provided link is
not valid (see ErrorTemplate and ShortenLink).
- Author:
- Michal Gajdos (michal.gajdos at oracle.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShortenerResource
public ShortenerResource()
form
@GET
@Produces(value="text/html")
public org.glassfish.jersey.server.mvc.Viewable form()
createLink
@POST
@Produces(value="text/html")
@Consumes(value="application/x-www-form-urlencoded")
@ErrorTemplate(name="/error-form")
public ShortenedLink createLink(@FormParam(value="link")
String link)
Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.