@SuppressWarnings("unchecked") public void render(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception { String tableName = "", keyName = "", orderby = "", extraFilter = ""; long reportId = 0; userId = CommonDAO.getUSERID(request); response.setContentType(Constants.CONTENT_TYPE); response.setHeader("Cache-Control", Constants.CACHE_CONTROL); PrintWriter pw = response.getWriter(); pw.write(getData().toString()); pw.flush(); pw.close(); log.info("EXIT - GetAccessibleUsersList()"); }
@SuppressWarnings("unchecked") public void render(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception { log.info("ENTER - GetuserInbox render()"); response.setContentType(Constants.CONTENT_TYPE); response.setHeader("Cache-Control", Constants.CACHE_CONTROL); userId = CommonDAO.getUSERID(request); groupId = CommonDAO.getUSERGROUPID(request); PrintWriter pw = response.getWriter(); if (Constants.DEBUG) pw.write(readData("/getList.do").toString()); else { pw.write(getData().toString()); } pw.flush(); pw.close(); log.info("EXIT - GetuserInbox render()"); }
public String save(HttpServletRequest request, SimpleJdbcTemplate template, Timestamp dstamp) { userId = CommonDAO.getUSERID(request); String success = ""; try { String resultsetname = ""; String resultdesc = ""; String reportids = ""; String repFlag = ""; String resultPermission = ""; String createUserId = ""; String resultSetID = ""; String transactionType = ""; String queryId = ""; String resultSetMode = ""; resultsetname = request.getParameter("resultName"); resultdesc = request.getParameter("resultDesc"); reportids = request.getParameter("reprtIds"); resultPermission = request.getParameter("resultPermn"); repFlag = request.getParameter("reportPickedFlag"); createUserId = request.getParameter("createUserID"); transactionType = request.getParameter("transactionType"); resultSetID = request.getParameter("resultSetID"); String TT = String.valueOf(IReportsConstants.deleteFlag); queryId = request.getParameter("queryID"); resultSetMode = request.getParameter("resultSetMode"); String resultCharts = "charts"; log.info("queryId: " + queryId); if (queryId == null) { log.info("queryID set to null"); queryId = ""; } log.info("transactiontype: " + transactionType); if (transactionType.equals(TT)) { // DELETE log.info("DELETE*****************"); success = deleteData(resultSetID, template); } else { // INSERT log.info("resultSetID------>" + resultSetID); if (transactionType.equals(String.valueOf(1))) { log.info("INSERT*******************"); Boolean namePrsnt = checkNameExists(template, resultsetname); if (namePrsnt == false) { if (resultSetMode.equals("charts")) { success = insertChartData( resultsetname, resultdesc, resultPermission, repFlag, queryId, template, dstamp); } else { success = insertData( resultsetname, resultdesc, resultPermission, reportids, repFlag, queryId, template, dstamp); } } else { success = "exists"; } } else { log.info("UPDATE*******************"); success = updateData( resultSetID, resultsetname, resultdesc, resultPermission, reportids, repFlag, queryId, template, dstamp); } } } catch (Exception e) { log.info(e); } return success; }