blob: 89f596f447f51ef0c0a2d6c9e09f950d8af99804 [file] [log] [blame]
Thomas Vachuska36be65f2015-12-08 12:36:15 -08001#set( $symbol_pound = '#' )
2#set( $symbol_dollar = '$' )
3#set( $symbol_escape = '\' )
4/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07005 * Copyright ${year}-present Open Networking Foundation
Thomas Vachuska36be65f2015-12-08 12:36:15 -08006 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package ${package};
20
21import com.fasterxml.jackson.databind.node.ObjectNode;
22import org.onosproject.rest.AbstractWebResource;
23
24import javax.ws.rs.GET;
25import javax.ws.rs.Path;
26import javax.ws.rs.core.Response;
27
Thomas Vachuska36be65f2015-12-08 12:36:15 -080028/**
29 * Sample web resource.
30 */
31@Path("sample")
32public class AppWebResource extends AbstractWebResource {
33
34 /**
35 * Get hello world greeting.
36 *
37 * @return 200 OK
38 */
39 @GET
40 @Path("")
41 public Response getGreeting() {
42 ObjectNode node = mapper().createObjectNode().put("hello", "world");
43 return ok(node).build();
44 }
45
46}