blob: 7875fc11d9940703dbf4f1c95b001006c66d4b06 [file] [log] [blame]
Thomas Vachuskaf7582552015-05-14 10:13:46 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.cord.gui;
18
19import javax.ws.rs.GET;
20import javax.ws.rs.Path;
21import javax.ws.rs.core.Response;
22
23/**
24 * Web resource to use as the GUI back-end and as a proxy to XOS REST API.
25 */
26@Path("")
27public class CordWebResource {
28
29 @GET
30 @Path("hello")
31 public Response hello() {
32 return Response.ok("Hello World").build();
33 }
34
Simon Hunt8dd716a2015-05-14 18:51:52 -070035 @GET
36 @Path("fake")
37 public Response fake() {
38 return Response.ok(FakeUtils.slurp("sample.json")).build();
39 }
Thomas Vachuskaf7582552015-05-14 10:13:46 -070040}