private void buildFastModuleTree(HttpServletRequest request, HttpServletResponse response) throws IOException { String parentId = request.getParameter("parentId"); String userId = request.getParameter("userId"); HashMap<String, RockPower> modulesMap = (HashMap<String, RockPower>) request.getSession().getAttribute(Constant.USERMODULES); String tree = JSONUtil.formObjectsToJSONStr( this.systemMgm.buildFastModuleTreeNodes(parentId, userId, modulesMap)); outputString(response, tree); }
private void buildModuleConfigTree(HttpServletRequest request, HttpServletResponse response) throws IOException { String parentId = request.getParameter("parentId"); String userId = request.getParameter("userId"); boolean includeFast = request.getParameter("includeFast") != null ? Boolean.valueOf((String) request.getParameter("includeFast")) : true; HashMap<String, RockPower> modulesMap = (HashMap<String, RockPower>) request.getSession().getAttribute(Constant.USERMODULES); String tree = JSONUtil.formObjectsToJSONStr( this.systemMgm.buildModuleConfigTreeNodes(parentId, userId, modulesMap, includeFast)); outputString(response, tree); }
private void buildTree(HttpServletRequest request, HttpServletResponse response) throws IOException { String parentId = request.getParameter("parentId"); String treeName = request.getParameter("treeName"); String attachUnit = request.getParameter("attachUnit") == null ? "" : request.getParameter("attachUnit"); String year = request.getParameter("year") == null ? new SimpleDateFormat("yyyy").format(Calendar.getInstance().getTime()) : request.getParameter("year"); String unitType = request.getParameter("unitType"); String tree = (treeName != null) ? JSONUtil.formObjectsToJSONStr( this.systemMgm.buildTreeNodes(treeName, parentId, attachUnit, year, unitType)) : ""; outputString(response, tree); }
private void getUserPortletConfig(HttpServletRequest request, HttpServletResponse response) throws IOException { String userid = request.getParameter("userid"); outputString( response, JSONUtil.formObjectsToJSONReaderStr(this.systemMgm.getUserPortletConfig(userid))); }