f865162a53ec3b007e1fa53b2738e384b9b6015d
[moon.git] /
1 /*
2  * Copyright (c) 2014, 2015 Hewlett-Packard Development Company, L.P. 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.aaa.idm.rest;
10
11 import javax.servlet.http.HttpServletRequest;
12 import javax.ws.rs.GET;
13 import javax.ws.rs.Path;
14 import javax.ws.rs.Produces;
15 import javax.ws.rs.core.Context;
16
17 import org.opendaylight.aaa.api.model.Version;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
20
21 /**
22  *
23  * @author peter.mellquist@hp.com
24  *
25  */
26 @Deprecated
27 @Path("/")
28 public class VersionHandler {
29     private static final Logger LOG = LoggerFactory.getLogger(VersionHandler.class);;
30
31     protected static String CURRENT_VERSION = "v1";
32     protected static String LAST_UPDATED = "2014-04-18T18:30:02.25Z";
33     protected static String CURRENT_STATUS = "CURRENT";
34
35     @GET
36     @Produces("application/json")
37     public Version getVersion(@Context HttpServletRequest request) {
38         LOG.info("Get /");
39         Version version = new Version();
40         version.setId(CURRENT_VERSION);
41         version.setUpdated(LAST_UPDATED);
42         version.setStatus(CURRENT_STATUS);
43         return version;
44     }
45
46 }