package au.org.ands.vocabs.toolkit.restlet;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/** Testing restlet. */
@Path("testing2")
public class TestRestlet2 {

    /** getMessage.
     * @return the message. */
    @Produces(MediaType.TEXT_PLAIN)
    @GET
    public final String getMessage() {
        return "Hello World! Again!";
        }

    /** getMessage.
     * @return the message. */
    @Produces(MediaType.APPLICATION_JSON)
    @GET
    public final String getMessageJson() {
        return "{\"hello\":\"Hello JSON!\"}";
        }

}

@@ -150,16 +150,91 @@
 diaType;
+%0Aimport javax.ws.rs.core.Response;%0Aimport javax.ws.rs.core.Response.Status;
 %0A%0A/** Te
@@ -684,10 +684,385 @@
      %7D%0A%0A
+    /** getException.%0A     * This shows how to return a status code 503 %22service unavailable%22%0A     * and also some content.%0A     * @return the message. */%0A    @Path(%22except%22)%0A    @Produces(MediaType.TEXT_PLAIN)%0A    @GET%0A    public final Response getExcept() %7B%0A        return Response.status(Status.SERVICE_UNAVAILABLE).%0A                entity(%22Hi there%22).build();%0A        %7D%0A%0A
 %7D%0A

Test generating a 503 status