package com.translationdata.messenger.resources;

import javax.ws.rs.Consumes;
import javax.ws.rs.CookieParam;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.MatrixParam;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("parameter")
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.TEXT_PLAIN)

public class ParameterResource {
	@GET
	@Path("/annotations")
	public String getParamsUsinsAnnotations(@MatrixParam("size") int size,
											@CookieParam("name") String name,
											@HeaderParam("priorityLevel") String priority) {
		return "Test Params by Annotation.\nSize = " + size + "\nName (Cookie Parameter) = " + name + "\nPriority (Header Parameter)= " + priority;
	}
}

@@ -270,25 +270,128 @@
 rs.core.
-MediaType
+Context;%0Aimport javax.ws.rs.core.HttpHeaders;%0Aimport javax.ws.rs.core.MediaType;%0Aimport javax.ws.rs.core.UriInfo
 ;%0A%0A@Path
@@ -559,17 +559,17 @@
 ramsUsin
-s
+g
 Annotati
@@ -708,16 +708,16 @@
 rity) %7B%0A
-
 %09%09return
@@ -852,11 +852,307 @@
 rity;%0A%09%7D
+%0A%0A%09@GET%0A%09@Path(%22/context%22)%0A%09public String getParamsUsingAnnotations(@Context UriInfo uriInfo, @Context HttpHeaders headers) %7B%0A%09%09return %22UriInfo: %22 + uriInfo.getAbsolutePath() %0A%09%09%09%09+ %22%5CnHeaders = %22 + headers.getRequestHeaders().toString()%0A%09%09%09%09+ %22%5CnCookies = %22 + headers.getCookies().toString();%0A%09%7D
 %0A%7D%0A

Add context functon