BUG 2302 : odl-clustering-test-app should not be part of the odl-restconf-all feature set
[controller.git] / opendaylight / northbound / commons / src / main / java / org / opendaylight / controller / northbound / commons / exception / MethodNotAllowed.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.core.Response;
12
13 /**
14  * Implementation of StatusType for error 405 as in:
15  * http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6
16  *
17  *
18  */
19 public class MethodNotAllowed implements Response.StatusType {
20     @Override
21     public int getStatusCode() {
22         return 405;
23     }
24
25     @Override
26     public String getReasonPhrase() {
27         return "Method Not Allowed";
28     }
29
30     @Override
31     public Response.Status.Family getFamily() {
32         return Response.Status.Family.CLIENT_ERROR;
33     }
34 }