/[projects]/miscJava/Test4Simple/src/main/java/dk/thoerup/webservice/PersonNotFoundException.java
ViewVC logotype

Contents of /miscJava/Test4Simple/src/main/java/dk/thoerup/webservice/PersonNotFoundException.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2521 - (show annotations) (download)
Wed Apr 29 09:32:47 2015 UTC (9 years ago) by torben
File size: 822 byte(s)
Add Person REST service

1 package dk.thoerup.webservice;
2
3 import javax.ws.rs.WebApplicationException;
4 import javax.ws.rs.core.Response;
5
6 public class PersonNotFoundException extends WebApplicationException {
7
8 private static final long serialVersionUID = 1L;
9
10 /**
11 * Create a HTTP 404 (Not Found) exception.
12 */
13 public PersonNotFoundException() {
14 super(
15 Response.status(Response.Status.NOT_FOUND).
16 entity("Person not found").
17 type("text/plain").build()
18 );
19 }
20
21 /**
22 * Create a HTTP 404 (Not Found) exception.
23 * @param message the String that is the entity of the 404 response.
24 */
25 /* public PersonNotFoundException(String message) {
26 super(
27 Response.status(Response.Status.NOT_FOUND).
28 entity("Person not found").
29 type("text/plain").build()
30 );
31 }*/
32 }

  ViewVC Help
Powered by ViewVC 1.1.20