/** * Handles empty get call this will return a list of projects that are * visible to the current user Not yet implemented. * * @param mimeType * @param modifiedSince * @param request * @throws IOException * @throws BizPolicyException */ @RequestMapping(method = {RequestMethod.GET}) public void handleEmptyGetRequest(@RequestHeader(value = "Accept", required = false) String mimeType, @RequestHeader(value = "If-Modified-Since", required = false) @DateTimeFormat(iso = DATE_TIME) Date modifiedSince, HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException, BizPolicyException { Person user = getAuthenticatedUser(); if (user == null) { resp.sendError(HttpServletResponse.SC_UNAUTHORIZED); return; } else { Set<Project> projects = projectBizService.findByAdmin(user); Bop bop = new Bop(); bop.setProjects(projects); resp.setCharacterEncoding("UTF-8"); resp.setContentType("text/xml"); objectBuilder.buildBusinessObjectPackage(bop, resp.getOutputStream()); } }
/** * Handles empty get call this will return a list of projects that are * visible to the current user Not yet implemented. * * @param mimeType * @param modifiedSince * @param request * @throws IOException * @throws BizPolicyException */ @RequestMapping(method = {RequestMethod.GET}) public void handleEmptyGetRequest(@RequestHeader(value = "Accept", required = false) String mimeType, @RequestHeader(value = "If-Modified-Since", required = false) @DateTimeFormat(iso = DATE_TIME) Date modifiedSince, HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException, BizPolicyException { Person user = getAuthenticatedUser(); if (user == null) { resp.sendError(HttpServletResponse.SC_UNAUTHORIZED); return; } else { Set<Project> projects = projectBizService.findByAdmin(user); Bop bop = new Bop(); bop.setProjects(projects); resp.setCharacterEncoding("UTF-8"); resp.setContentType("text/xml"); objectBuilder.buildBusinessObjectPackage(bop, resp.getOutputStream()); } }