1 25 26 package org.objectweb.jonas.webapp.jonasadmin.deploy; 27 28 import java.util.ArrayList ; 29 import java.util.HashMap ; 30 import java.util.Map ; 31 import java.util.TreeMap ; 32 33 import javax.servlet.http.HttpServletRequest ; 34 35 import org.apache.struts.action.ActionErrors; 36 import org.apache.struts.action.ActionForm; 37 import org.apache.struts.action.ActionMapping; 38 39 43 44 public class DomainDeployForm extends ActionForm { 45 46 48 public static final String DEPLOY = "deploy"; 49 public static final String UPLOAD = "upload"; 50 public static final String UPLOADDEPLOY = "uploadDeploy"; 51 52 54 55 private ArrayList listDeployable = new ArrayList (); 57 private ArrayList listServers = new ArrayList (); 59 private ArrayList listServerNames = new ArrayList (); 61 62 private ArrayList listDeploy = new ArrayList (); 64 private ArrayList listTargetServers = new ArrayList (); 66 private ArrayList listTargetServerNames = new ArrayList (); 68 69 private Map reports = new TreeMap (); 71 72 private String deploy = null; 73 74 private String selectedOption = null; 76 private boolean replaceOnTarget = false; 78 private String [] deploySelected = new String [0]; 80 private String [] serverSelected = new String [0]; 82 83 private boolean confirm = false; 85 private boolean deploymentComplete = false; 87 private boolean deploymentInProgress = false; 89 90 private String selectedAction = null; 92 private boolean replacementOption = false; 94 95 private boolean exception = false; 97 98 100 106 107 public void reset(ActionMapping mapping, HttpServletRequest request) { 108 deploySelected = new String [0]; 109 serverSelected = new String [0]; 110 setSelectedOption(DEPLOY); 111 replaceOnTarget = false; 112 exception = false; 113 } 114 115 125 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 126 ActionErrors oErrors = new ActionErrors(); 127 return oErrors; 128 } 129 130 public String toString() { 131 StringBuffer sb = new StringBuffer (); 132 sb.append(" listDeployable = ").append(listDeployable).append("\n"); 133 sb.append(" listServers = ").append(listServers).append("\n"); 134 sb.append(" listDeploy = ").append(listDeploy).append("\n"); 135 sb.append(" listTargetServers = ").append(listTargetServers).append("\n"); 136 sb.append(" reports = ").append(reports).append("\n"); 137 sb.append(" deploySelected = ["); 138 for (int i = 0; i < deploySelected.length; i++) { 139 if (i > 0) { 140 sb.append(", "); 141 } 142 sb.append(deploySelected[i]); 143 } 144 sb.append("]\n"); 145 sb.append(" serverSelected = ["); 146 for (int i = 0; i < serverSelected.length; i++) { 147 if (i > 0) { 148 sb.append(", "); 149 } 150 sb.append(serverSelected[i]); 151 } 152 sb.append("]\n"); 153 sb.append(" deploy = ").append(deploy).append("\n"); 154 sb.append(" complete = ").append(deploymentComplete).append("\n"); 155 sb.append(" progress = ").append(deploymentInProgress).append("\n"); 156 sb.append(" selectedOption = ").append(selectedOption).append("\n"); 157 sb.append(" replaceOnTarget = ").append(replaceOnTarget).append("\n"); 158 sb.append(" selectedAction = ").append(selectedAction).append("\n"); 159 sb.append(" replacementOption = ").append(replacementOption).append("\n"); 160 161 return sb.toString(); 162 } 163 164 166 public ArrayList getListServers() { 167 return listServers; 168 } 169 170 public void setListServers(ArrayList listServers) { 171 this.listServers = listServers; 172 } 173 174 public ArrayList getListServerNames() { 175 return listServerNames; 176 } 177 178 public void setListServerNames(ArrayList listServerNames) { 179 this.listServerNames = listServerNames; 180 } 181 182 public Map getReports() { 183 return reports; 184 } 185 186 public void setReports(Map reports) { 187 this.reports = reports; 188 } 189 190 public ArrayList getListTargetServers() { 191 return listTargetServers; 192 } 193 194 public void setListTargetServers(ArrayList listTargetServers) { 195 this.listTargetServers = listTargetServers; 196 } 197 198 public ArrayList getListTargetServerNames() { 199 return listTargetServerNames; 200 } 201 202 public void setListTargetServerNames(ArrayList listTargetServerNames) { 203 this.listTargetServerNames = listTargetServerNames; 204 } 205 206 public ArrayList getListDeployable() { 207 return listDeployable; 208 } 209 210 public void setListDeployable(ArrayList listDeployable) { 211 this.listDeployable = listDeployable; 212 } 213 214 public String [] getDeploySelected() { 215 return deploySelected; 216 } 217 218 public void setDeploySelected(String [] deploySelected) { 219 this.deploySelected = deploySelected; 220 } 221 222 public String [] getServerSelected() { 223 return serverSelected; 224 } 225 226 public void setServerSelected(String [] serverSelected) { 227 this.serverSelected = serverSelected; 228 } 229 230 public ArrayList getListDeploy() { 231 return listDeploy; 232 } 233 234 public void setListDeploy(ArrayList listDeploy) { 235 this.listDeploy = listDeploy; 236 } 237 238 public String getDeploy() { 239 return deploy; 240 } 241 242 public void setDeploy(String deploy) { 243 this.deploy = deploy; 244 } 245 246 public boolean isConfirm() { 247 return confirm; 248 } 249 250 public void setConfirm(boolean confirm) { 251 this.confirm = confirm; 252 } 253 254 public boolean getDeploymentInProgress() { 255 return deploymentInProgress; 256 } 257 258 public void setDeploymentInProgress(boolean deploymentInProgress) { 259 this.deploymentInProgress = deploymentInProgress; 260 } 261 262 public boolean getDeploymentComplete() { 263 return deploymentComplete; 264 } 265 266 public void setDeploymentComplete(boolean deploymentComplete) { 267 this.deploymentComplete = deploymentComplete; 268 } 269 270 public String getSelectedOption() { 271 return this.selectedOption; 272 } 273 274 public void setSelectedOption(String selectedOption) { 275 this.selectedOption = selectedOption; 276 } 277 278 public String getSelectedAction() { 279 return this.selectedAction; 280 } 281 282 public void setSelectedAction(String selectedAction) { 283 this.selectedAction = selectedAction; 284 } 285 286 public boolean getReplaceOnTarget() { 287 return replaceOnTarget; 288 } 289 290 public void setReplaceOnTarget(boolean replaceChecked) { 291 this.replaceOnTarget = replaceChecked; 292 } 293 294 public boolean getReplacementOption() { 295 return replacementOption; 296 } 297 298 public void setReplacementOption(boolean replacementOption) { 299 this.replacementOption = replacementOption; 300 } 301 302 public boolean getException() { 303 return exception; 304 } 305 306 public void setException(boolean exception) { 307 this.exception = exception; 308 } 309 } 310 | Popular Tags |