1 26 27 package org.objectweb.jonas.webapp.jonasadmin.security; 28 29 import java.io.IOException ; 30 31 import javax.servlet.ServletException ; 32 import javax.servlet.http.HttpServletRequest ; 33 import javax.servlet.http.HttpServletResponse ; 34 35 import org.apache.struts.action.ActionForm; 36 import org.apache.struts.action.ActionForward; 37 import org.apache.struts.action.ActionMapping; 38 39 42 43 public class EditRoleMemoryRealmAction extends BaseMemoryRealmAction { 44 45 47 49 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 50 , HttpServletRequest p_Request, HttpServletResponse p_Response) 51 throws IOException , ServletException { 52 53 MemoryRealmForm oRealmForm = getForm(p_Mapping, p_Request); 55 56 String sRole = p_Request.getParameter("role"); 58 RoleMemoryRealmForm oForm = new RoleMemoryRealmForm(); 60 m_Session.setAttribute("roleMemoryRealmForm", oForm); 61 oForm.reset(p_Mapping, p_Request); 62 oForm.setAction("apply"); 64 65 try { 67 if (sRole == null) { 69 throw new Exception (m_Resources.getMessage( 70 "error.security.factory.memory.realm.roles.role.required")); 71 } 72 populateRoleForm(oRealmForm, oForm, sRole); 73 } 74 catch (Throwable t) { 75 addGlobalError(t); 76 saveErrors(p_Request, m_Errors); 77 return (p_Mapping.findForward("Global Error")); 78 } 79 return (p_Mapping.findForward("Role Memory Realm")); 81 } 82 83 85 } 86 | Popular Tags |