package com.github.sbugat.samplerest.resource;

import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;

import com.github.sbugat.samplerest.service.OrikaBeanMapper;

@Consumes({ GenericResource.API_VERSION1_MEDIA_TYPE, GenericResource.API_VERSION2_MEDIA_TYPE })
@Produces({ GenericResource.API_VERSION1_MEDIA_TYPE, GenericResource.API_VERSION2_MEDIA_TYPE })
public abstract class GenericResource {

	protected final static String API_VERSION1_MEDIA_TYPE = "application/apiv1+json";

	protected final static String API_VERSION2_MEDIA_TYPE = "application/apiv2+json";

	@Inject
	protected OrikaBeanMapper orikaBeanMapper;
}

@@ -131,16 +131,84 @@
 oduces;%0D
+%0Aimport javax.ws.rs.core.Context;%0D%0Aimport javax.ws.rs.core.UriInfo;%0D
 %0A%0D%0Aimpor
@@ -729,12 +729,54 @@
 Mapper;%0D
+%0A%0D%0A%09@Context%0D%0A%09protected UriInfo uriInfo;%0D
 %0A%7D%0D%0A

Add uriInfo in GenericResource