Merge "Move adsal into its own subdirectory."
[controller.git] / opendaylight / adsal / northbound / commons / src / main / java / org / opendaylight / controller / northbound / commons / exception / ResourceGoneException.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.northbound.commons.exception;
10
11 import javax.ws.rs.WebApplicationException;
12 import javax.ws.rs.core.Response;
13 import javax.ws.rs.core.MediaType;
14
15 /**
16  * Status Code 410 (Gone)
17  *
18  * The requested resource is no longer available at the server and no
19  * forwarding address is known. This condition is expected to be
20  * considered permanent. Clients with link editing capabilities SHOULD
21  * delete references to the Request-URI after user approval. If the
22  * server does not know, or has no facility to determine, whether or
23  * not the condition is permanent, the status code 404 (Not Found)
24  * SHOULD be used instead. This response is cacheable unless indicated
25  * otherwise.
26  *
27  *
28  *
29  */
30 public class ResourceGoneException extends WebApplicationException {
31     private static final long serialVersionUID = 1L;
32
33     public ResourceGoneException(String string) {
34         super(Response.status(Response.Status.GONE).entity(string).type(
35                 MediaType.TEXT_PLAIN).build());
36     }
37 }