@Test public void qualificationRequest() { ResearchEntity re = TestPLCEntityFactory.createResearchEntity(); researcherResource.setHttpContext(context); String results = researcherResource.qualificationRequest(re); assertNotNull(results); }
@RolesAllowed({OAuthToken.PLC_ROLE }) @POST @Path("qualification_request") @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) public String qualificationRequest(ResearchEntity re) { OAuthParameters params = new OAuthParameters(); params.readRequest(new OAuthServerRequest(httpContext.getRequest())); OAuthToken token = tokenDao.getByToken(params.getToken()); re.setToken(token); researchEntityDao.save(re); return "Researcher Access Successfully requested."; }
ResearcherResource { @RolesAllowed({OAuthToken.PLC_ROLE }) @POST @Path("qualification_request") @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) public String qualificationRequest(ResearchEntity re) { OAuthParameters params = new OAuthParameters(); params.readRequest(new OAuthServerRequest(httpContext.getRequest())); OAuthToken token = tokenDao.getByToken(params.getToken()); re.setToken(token); researchEntityDao.save(re); return "Researcher Access Successfully requested."; } }
ResearcherResource { @RolesAllowed({OAuthToken.PLC_ROLE }) @POST @Path("qualification_request") @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) public String qualificationRequest(ResearchEntity re) { OAuthParameters params = new OAuthParameters(); params.readRequest(new OAuthServerRequest(httpContext.getRequest())); OAuthToken token = tokenDao.getByToken(params.getToken()); re.setToken(token); researchEntityDao.save(re); return "Researcher Access Successfully requested."; } @Inject  ResearcherResource(ResearchEntityDao researchEntityDao, TokenDao tokenDao,
            PatientDataService patientDataService, PLCApplicationResources appResources); }
ResearcherResource { @RolesAllowed({OAuthToken.PLC_ROLE }) @POST @Path("qualification_request") @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) public String qualificationRequest(ResearchEntity re) { OAuthParameters params = new OAuthParameters(); params.readRequest(new OAuthServerRequest(httpContext.getRequest())); OAuthToken token = tokenDao.getByToken(params.getToken()); re.setToken(token); researchEntityDao.save(re); return "Researcher Access Successfully requested."; } @Inject  ResearcherResource(ResearchEntityDao researchEntityDao, TokenDao tokenDao,
            PatientDataService patientDataService, PLCApplicationResources appResources); @RolesAllowed({OAuthToken.PLC_ROLE }) @POST @Path("qualification_request") @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) String qualificationRequest(ResearchEntity re); @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @POST @Path("shared/summary") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) Summary dataSummary(Filter filter); @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @POST @Path("shared") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) DownloadDetails requestData(Filter filter); @Path("shared/download/{fileName}") @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @GET Response downloadPatientData(@PathParam("fileName") final String fileName); }
ResearcherResource { @RolesAllowed({OAuthToken.PLC_ROLE }) @POST @Path("qualification_request") @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) public String qualificationRequest(ResearchEntity re) { OAuthParameters params = new OAuthParameters(); params.readRequest(new OAuthServerRequest(httpContext.getRequest())); OAuthToken token = tokenDao.getByToken(params.getToken()); re.setToken(token); researchEntityDao.save(re); return "Researcher Access Successfully requested."; } @Inject  ResearcherResource(ResearchEntityDao researchEntityDao, TokenDao tokenDao,
            PatientDataService patientDataService, PLCApplicationResources appResources); @RolesAllowed({OAuthToken.PLC_ROLE }) @POST @Path("qualification_request") @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) String qualificationRequest(ResearchEntity re); @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @POST @Path("shared/summary") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) Summary dataSummary(Filter filter); @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @POST @Path("shared") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) DownloadDetails requestData(Filter filter); @Path("shared/download/{fileName}") @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @GET Response downloadPatientData(@PathParam("fileName") final String fileName);  }