+++ /dev/null
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.SecurityContext;
-
-import org.codehaus.enunciate.jaxrs.StatusCodes;
-import org.codehaus.enunciate.jaxrs.TypeHint;
-
-/**
- * Northbound REST API
- *
- * <br>
- * <br>
- * Authentication scheme : <b>HTTP Basic</b><br>
- * Authentication realm : <b>opendaylight</b><br>
- * Transport : <b>HTTP and HTTPS</b><br>
- * <br>
- * HTTPS Authentication is disabled by default.
- */
-
-@Path("/")
-public class Northbound {
-
- private String username;
-
- @Context
- public void setSecurityContext(SecurityContext context) {
- if (context != null && context.getUserPrincipal() != null) {
- username = context.getUserPrincipal().getName();
- }
- }
-
- /**
- *
- * Sample REST API call
- *
- * @return A response string
- *
- * <pre>
- * Example:
- *
- * Request URL:
- * http://localhost:8080/northbound/${artifactId}/api
- *
- * Response body in XML:
- * <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- * Sample Northbound API
- *
- * Response body in JSON:
- * Sample Northbound API
- * </pre>
- */
- @Path("/api")
- @GET
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @TypeHint(String.class)
- @StatusCodes()
- public String getWidget() {
- String result = "Sample Northbound API - ${artifactId}";
- return result;
- }
-
-}