2 * Copyright (c) 2014, 2015 Hewlett-Packard Development Company, L.P. 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.aaa.idm.rest;
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;
17 import org.opendaylight.aaa.api.model.Version;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
23 * @author peter.mellquist@hp.com
28 public class VersionHandler {
29 private static final Logger LOG = LoggerFactory.getLogger(VersionHandler.class);;
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";
36 @Produces("application/json")
37 public Version getVersion(@Context HttpServletRequest request) {
39 Version version = new Version();
40 version.setId(CURRENT_VERSION);
41 version.setUpdated(LAST_UPDATED);
42 version.setStatus(CURRENT_STATUS);