WarForm.java

00001 /*
00002  * JOnAS: Java(TM) Open Application Server
00003  * Copyright (C) 1999 Bull S.A.
00004  * Contact: jonas-team@objectweb.org
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00019  * USA
00020  *
00021  * --------------------------------------------------------------------------
00022  * $Id: WarForm.java,v 1.7 2004/03/19 14:31:49 sauthieg Exp $
00023  * --------------------------------------------------------------------------
00024  */
00025 
00026 package org.objectweb.jonas.webapp.jonasadmin.service.container;
00027 
00028 import java.util.ArrayList;
00029 import java.util.Collections;
00030 
00031 import javax.servlet.http.HttpServletRequest;
00032 
00033 import org.apache.struts.action.ActionErrors;
00034 import org.apache.struts.action.ActionForm;
00035 import org.apache.struts.action.ActionMapping;
00036 import org.objectweb.jonas.webapp.jonasadmin.JonasAdminJmx;
00037 
00041 public class WarForm extends ActionForm {
00042 
00043 // --------------------------------------------------------- Properties variables
00044 
00045     private String path = null;
00046     private String filename = null;
00047     private String contextRoot = null;
00048     private String hostName = null;
00049     private String warFile = null;
00050     private String warPath = null;
00051     private boolean java2DelegationModel = false;
00052     private boolean inEarCase = false;
00053     private String earPath = null;
00054     private String xmlContent = null;
00055     private String jonasXmlContent = null;
00056     private String[] servletsName = null;
00057     private ArrayList listServlets = new ArrayList();
00058     private String earFilename = null;
00059 
00060 // --------------------------------------------------------- Public Methods
00061 
00069     public void reset(ActionMapping mapping, HttpServletRequest request) {
00070         path = null;
00071         filename = null;
00072 
00073         contextRoot = null;
00074         hostName = null;
00075         warPath = null;
00076         java2DelegationModel = false;
00077         inEarCase = false;
00078         earPath = null;
00079         earFilename = null;
00080         xmlContent = null;
00081         jonasXmlContent = null;
00082         servletsName = null;
00083         listServlets = new ArrayList();
00084     }
00085 
00097     public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
00098         ActionErrors oErrors = new ActionErrors();
00099         return oErrors;
00100     }
00101 
00102 // --------------------------------------------------------- Properties Methods
00103 
00104     public String getPath() {
00105         return path;
00106     }
00107 
00108     public void setPath(String path) {
00109         this.path = path;
00110     }
00111 
00112     public String getFilename() {
00113         return filename;
00114     }
00115 
00116     public void setFilename(String filename) {
00117         this.filename = filename;
00118     }
00119 
00120     public String getHostName() {
00121         return hostName;
00122     }
00123 
00124     public void setHostName(String hostName) {
00125         this.hostName = hostName;
00126     }
00127 
00128     public String getWarPath() {
00129         return warPath;
00130     }
00131 
00132     public void setWarPath(java.net.URL p_WarUrl) {
00133         this.warPath = null;
00134         if (p_WarUrl != null) {
00135             this.warPath = p_WarUrl.getPath();
00136         }
00137     }
00138 
00139     public boolean getInEarCase() {
00140         return inEarCase;
00141     }
00142 
00143     public void setInEarCase(boolean inEarCase) {
00144         this.inEarCase = inEarCase;
00145     }
00146 
00147     public String getContextRoot() {
00148         return contextRoot;
00149     }
00150 
00151     public void setContextRoot(String contextRoot) {
00152         this.contextRoot = contextRoot;
00153     }
00154 
00155     public boolean getJava2DelegationModel() {
00156         return java2DelegationModel;
00157     }
00158 
00159     public void setJava2DelegationModel(boolean java2DelegationModel) {
00160         this.java2DelegationModel = java2DelegationModel;
00161     }
00162 
00163     public String getXmlContent() {
00164         return xmlContent;
00165     }
00166 
00167     public void setXmlContent(String xmlContent) {
00168         this.xmlContent = xmlContent;
00169     }
00170 
00171     public String getJonasXmlContent() {
00172         return jonasXmlContent;
00173     }
00174 
00175     public void setJonasXmlContent(String jonasXmlContent) {
00176         this.jonasXmlContent = jonasXmlContent;
00177     }
00178 
00179     public String[] getServletsName() {
00180         return servletsName;
00181     }
00182 
00183     public void setServletsName(String[] servletsName) {
00184         this.servletsName = servletsName;
00185         // Fill list
00186         listServlets = new ArrayList();
00187         for (int i = 0; i < this.servletsName.length; i++) {
00188             listServlets.add(this.servletsName[i]);
00189         }
00190         Collections.sort(listServlets);
00191     }
00192 
00193     public ArrayList getListServlets() {
00194         return listServlets;
00195     }
00196 
00197     public String getEarPath() {
00198         return earPath;
00199     }
00200 
00201     public void setEarPath(java.net.URL p_EarUrl) {
00202         earPath = null;
00203         earFilename = null;
00204         if (p_EarUrl != null) {
00205             earPath = p_EarUrl.getPath();
00206             earFilename = JonasAdminJmx.extractFilename(earPath);
00207         }
00208     }
00209 
00210     public String getEarFilename() {
00211         return earFilename;
00212     }
00213 
00214 }

Generated on Tue Feb 15 15:05:31 2005 for JOnAS by  doxygen 1.3.9.1