2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.northbound.commons.exception;
11 import javax.ws.rs.WebApplicationException;
12 import javax.ws.rs.core.Response;
13 import javax.ws.rs.core.MediaType;
16 * Status Code 410 (Gone)
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
30 public class ResourceGoneException extends WebApplicationException {
31 private static final long serialVersionUID = 1L;
33 public ResourceGoneException(String string) {
34 super(Response.status(Response.Status.GONE).entity(string).type(
35 MediaType.TEXT_PLAIN).build());