1 21 22 package com.izforge.izpack; 23 24 import java.io.Serializable ; 25 import java.util.ArrayList ; 26 import java.util.List ; 27 28 34 35 public class ExecutableFile implements Serializable  36 { 37 38 static final long serialVersionUID = 4175489415984990405L; 39 40 41 public final static int POSTINSTALL = 0; 42 43 public final static int NEVER = 1; 44 45 public final static int UNINSTALL = 2; 46 47 48 public final static int BIN = 0; 49 50 public final static int JAR = 1; 51 52 53 public final static int ABORT = 0; 54 55 public final static int WARN = 1; 56 57 public final static int ASK = 2; 58 59 public final static int IGNORE = 3; 60 61 62 public String path; 63 64 65 public int executionStage; 66 67 68 public String mainClass; 69 70 71 public int type; 72 73 74 public int onFailure; 75 76 77 public List argList = null; 78 79 80 public List osList = null; 81 82 86 public boolean keepFile; 87 88 89 public ExecutableFile() 90 { 91 this.path = null; 92 executionStage = NEVER; 93 mainClass = null; 94 type = BIN; 95 onFailure = ASK; 96 osList = new ArrayList (); 97 argList = new ArrayList (); 98 keepFile = false; 99 } 100 101 109 public ExecutableFile(String path, int executionStage, int onFailure, java.util.List osList, 110 boolean keepFile) 111 { 112 this.path = path; 113 this.executionStage = executionStage; 114 this.onFailure = onFailure; 115 this.osList = osList; 116 this.keepFile = keepFile; 117 } 118 119 public ExecutableFile(String path, int type, String mainClass, int executionStage, 120 int onFailure, java.util.List argList, java.util.List osList, boolean keepFile) 121 { 122 this.path = path; 123 this.mainClass = mainClass; 124 this.type = type; 125 this.executionStage = executionStage; 126 this.onFailure = onFailure; 127 this.argList = argList; 128 this.osList = osList; 129 this.keepFile = keepFile; 130 } 131 132 public String toString() 133 { 134 StringBuffer retval = new StringBuffer (); 135 retval.append("path = ").append(path); 136 retval.append("\n"); 137 retval.append("mainClass = ").append(mainClass); 138 retval.append("\n"); 139 retval.append("type = ").append(type); 140 retval.append("\n"); 141 retval.append("executionStage = ").append(executionStage); 142 retval.append("\n"); 143 retval.append("onFailure = ").append(onFailure); 144 retval.append("\n"); 145 retval.append("argList: ").append(argList); 146 retval.append("\n"); 147 if (argList != null) 148 { 149 for (int i = 0; i < argList.size(); i++) 150 { 151 retval.append("\targ: ").append(argList.get(i)); 152 retval.append("\n"); 153 } 154 } 155 retval.append("\n"); 156 retval.append("osList = ").append(osList); 157 retval.append("\n"); 158 if (osList != null) 159 { 160 for (int i = 0; i < osList.size(); i++) 161 { 162 retval.append("\tos: ").append(osList.get(i)); 163 retval.append("\n"); 164 } 165 } 166 retval.append("keepFile = ").append(keepFile); 167 retval.append("\n"); 168 return retval.toString(); 169 } 170 } 171
| Popular Tags
|