1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.container; 27 28 import java.util.ArrayList ; 29 import java.util.Collections ; 30 31 import javax.servlet.http.HttpServletRequest ; 32 33 import org.apache.struts.action.ActionErrors; 34 import org.apache.struts.action.ActionForm; 35 import org.apache.struts.action.ActionMapping; 36 import org.objectweb.jonas.webapp.jonasadmin.JonasAdminJmx; 37 38 41 public class WarForm extends ActionForm { 42 43 45 private String path = null; 46 private String filename = null; 47 private String contextRoot = null; 48 private String hostName = null; 49 private String warFile = null; 50 private String warPath = null; 51 private boolean java2DelegationModel = false; 52 private boolean inEarCase = false; 53 private String earPath = null; 54 private String xmlContent = null; 55 private String jonasXmlContent = null; 56 private String [] servletsName = null; 57 private ArrayList listServlets = new ArrayList (); 58 private String earFilename = null; 59 60 62 68 69 public void reset(ActionMapping mapping, HttpServletRequest request) { 70 path = null; 71 filename = null; 72 73 contextRoot = null; 74 hostName = null; 75 warPath = null; 76 java2DelegationModel = false; 77 inEarCase = false; 78 earPath = null; 79 earFilename = null; 80 xmlContent = null; 81 jonasXmlContent = null; 82 servletsName = null; 83 listServlets = new ArrayList (); 84 } 85 86 97 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 98 ActionErrors oErrors = new ActionErrors(); 99 return oErrors; 100 } 101 102 104 public String getPath() { 105 return path; 106 } 107 108 public void setPath(String path) { 109 this.path = path; 110 } 111 112 public String getFilename() { 113 return filename; 114 } 115 116 public void setFilename(String filename) { 117 this.filename = filename; 118 } 119 120 public String getHostName() { 121 return hostName; 122 } 123 124 public void setHostName(String hostName) { 125 this.hostName = hostName; 126 } 127 128 public String getWarPath() { 129 return warPath; 130 } 131 132 public void setWarPath(java.net.URL p_WarUrl) { 133 this.warPath = null; 134 if (p_WarUrl != null) { 135 this.warPath = p_WarUrl.getPath(); 136 } 137 } 138 139 public boolean getInEarCase() { 140 return inEarCase; 141 } 142 143 public void setInEarCase(boolean inEarCase) { 144 this.inEarCase = inEarCase; 145 } 146 147 public String getContextRoot() { 148 return contextRoot; 149 } 150 151 public void setContextRoot(String contextRoot) { 152 this.contextRoot = contextRoot; 153 } 154 155 public boolean getJava2DelegationModel() { 156 return java2DelegationModel; 157 } 158 159 public void setJava2DelegationModel(boolean java2DelegationModel) { 160 this.java2DelegationModel = java2DelegationModel; 161 } 162 163 public String getXmlContent() { 164 return xmlContent; 165 } 166 167 public void setXmlContent(String xmlContent) { 168 this.xmlContent = xmlContent; 169 } 170 171 public String getJonasXmlContent() { 172 return jonasXmlContent; 173 } 174 175 public void setJonasXmlContent(String jonasXmlContent) { 176 this.jonasXmlContent = jonasXmlContent; 177 } 178 179 public String [] getServletsName() { 180 return servletsName; 181 } 182 183 public void setServletsName(String [] servletsName) { 184 this.servletsName = servletsName; 185 listServlets = new ArrayList (); 187 for (int i = 0; i < this.servletsName.length; i++) { 188 listServlets.add(this.servletsName[i]); 189 } 190 Collections.sort(listServlets); 191 } 192 193 public ArrayList getListServlets() { 194 return listServlets; 195 } 196 197 public String getEarPath() { 198 return earPath; 199 } 200 201 public void setEarPath(java.net.URL p_EarUrl) { 202 earPath = null; 203 earFilename = null; 204 if (p_EarUrl != null) { 205 earPath = p_EarUrl.getPath(); 206 earFilename = JonasAdminJmx.extractFilename(earPath); 207 } 208 } 209 210 public String getEarFilename() { 211 return earFilename; 212 } 213 214 } | Popular Tags |