Assignment assignment = signet.getAssignment(Integer.parseInt(assignmentIDs[i])); assignment.revoke(loggedInPrivilegedSubject); assignment.save();
Grantable grantableInstance = Common.getGrantableFromParamStr(signet, assignmentIDs[i]); grantableInstance.revoke(loggedInPrivilegedSubject); grantableInstance.save();
  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"));    }        PrivilegedSubject loggedInPrivilegedSubject      = (PrivilegedSubject)          (request.getSession().getAttribute(Constants.LOGGEDINUSER_ATTRNAME));            // Find the Assignments specified by the multi-valued "revoke" parameter,    // and revoke them.    String[] assignmentIDs = request.getParameterValues("revoke");        signet.beginTransaction();        for (int i = 0; i < assignmentIDs.length; i++)    {      Assignment assignment      	= signet.getAssignment(Integer.parseInt(assignmentIDs[i]));      assignment.revoke(loggedInPrivilegedSubject);      assignment.save();    }        signet.commit();    // Forward to our success page    return findSuccess(mapping);  }