1 25 26 package org.objectweb.jonas.webapp.jonasadmin.deploy; 27 28 import java.io.IOException ; 29 import java.util.ArrayList ; 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 import org.objectweb.jonas.webapp.jonasadmin.Jlists; 39 40 43 44 public class EditDeployAction extends BaseDeployAction { 45 46 48 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 49 , HttpServletRequest p_Request, HttpServletResponse p_Response) 50 throws IOException , ServletException { 51 52 DeployForm oForm = (DeployForm) p_Form; 54 try { 55 setCurrentJonasDeployment(p_Request); 57 ArrayList alDeployable = getListDeployableFiles(); 59 ArrayList alDeployed = getListDeployedFiles(); 61 ArrayList alUndeploy = new ArrayList (alDeployable); 63 alUndeploy.removeAll(alDeployed); 64 ArrayList alDeploy = new ArrayList (alDeployed); 66 67 oForm.setListDeployable(alDeployable); 69 oForm.setListDeployed(alDeployed); 70 oForm.setListDeploy(alDeploy); 71 oForm.setListUndeploy(alUndeploy); 72 oForm.setDeploy(Jlists.getString(alDeploy, Jlists.SEPARATOR)); 73 oForm.setUndeploy(Jlists.getString(alUndeploy, Jlists.SEPARATOR)); 74 75 } 76 catch (Throwable t) { 77 addGlobalError(t); 78 saveErrors(p_Request, m_Errors); 79 return (p_Mapping.findForward("Global Error")); 80 } 81 return (p_Mapping.findForward(getForwardEdit())); 83 } 84 85 } 86 | Popular Tags |