session.setAttribute ("currentGranteePrivilegedSubject", assignment.getGrantee()); session.setAttribute ("currentSubsystem", assignment.getFunction().getSubsystem());
  public ActionForward execute  	(ActionMapping				mapping,     ActionForm 					form,     HttpServletRequest 	request,     HttpServletResponse response)  throws Exception  {    // Setup message array in case there are errors    ArrayList messages = new ArrayList();    // Confirm message resources loaded    MessageResources resources = getResources(request);    if (resources==null)    {      messages.add(Constants.ERROR_MESSAGES_NOT_LOADED);    }    // If there were errors, forward to our failure page    if (messages.size()>0)    {      request.setAttribute(Constants.ERROR_KEY,messages);      return findFailure(mapping);    }        HttpSession session = request.getSession();    Signet signet = (Signet)(session.getAttribute("signet"));        if (signet == null)    {      return (mapping.findForward("notInitialized"));    }        // If we've received a "scope" parameter, then it means we're attempting    // to create a new Assignment. If we receive an "assignmentID" parameter    // instead, then it means we're editing an existing Assignment. In either    // case, we'll stash the received parameter in the Session.        if (request.getParameter("scope") != null)    {      TreeNode currentScope = signet.getTreeNode(request.getParameter("scope"));      session.setAttribute("currentScope", currentScope);    }    else    {      Assignment assignment        = signet.getAssignment            (Integer.parseInt              (request.getParameter                ("assignmentId")));      session.setAttribute("currentAssignment", assignment);            session.setAttribute        ("currentCategory", assignment.getFunction().getCategory());      session.setAttribute        ("currentFunction", assignment.getFunction());      session.setAttribute        ("currentScope", assignment.getScope());    }    // Forward to our success page    return findSuccess(mapping);  }