1 26 27 package org.objectweb.jonas.ant.cluster; 28 29 import java.util.ArrayList ; 30 import java.util.List ; 31 32 import org.apache.tools.ant.Task; 33 34 import org.objectweb.jonas.ant.jonasbase.Tasks; 35 36 40 public abstract class ClusterTasks extends Tasks { 41 42 45 protected static final String ARCH_BOTH_WEB_EJB = "bothWebEjb"; 46 47 50 protected static final String ARCH_SEPARATED_WEB_EJB = "separatedWebEjb"; 51 52 55 private String logInfo = null; 56 57 60 private String destDirPrefix = null; 61 62 65 private int destDirSuffixIndFirst = -1; 66 67 70 private int destDirSuffixIndLast = -1; 71 72 75 private List clusterTasks = null; 76 77 80 private String arch = null; 81 82 85 private Task rootTask = null; 86 87 90 public ClusterTasks() { 91 clusterTasks = new ArrayList (); 92 } 93 94 98 public void setDestDirPrefix(String destDirPrefix) { 99 this.destDirPrefix = destDirPrefix; 100 } 101 102 106 public String getDestDirPrefix() { 107 return destDirPrefix; 108 } 109 110 113 public void setDestDirSuffixIndFirst(int destDirSuffixIndFirst) { 114 this.destDirSuffixIndFirst = destDirSuffixIndFirst; 115 } 116 117 121 public int getDestDirSuffixIndFirst() { 122 return destDirSuffixIndFirst; 123 } 124 125 128 public void setDestDirSuffixIndLast(int destDirSuffixIndLast) { 129 this.destDirSuffixIndLast = destDirSuffixIndLast; 130 } 131 135 public int getDestDirSuffixIndLast() { 136 return destDirSuffixIndLast; 137 } 138 139 144 public String getLogInfo() { 145 return logInfo; 146 } 147 148 153 public void setLogInfo(String logInfo) { 154 this.logInfo = logInfo; 155 } 156 157 163 public static String getDestDir(String destDirPrefix, int i) { 164 String destDir = destDirPrefix + i; 165 return destDir; 166 } 167 168 172 public void setArch(String arch) { 173 this.arch = arch; 174 } 175 176 180 public String getArch() { 181 return arch; 182 } 183 184 188 public void setRootTask(Task rootTask) { 189 this.rootTask = rootTask; 190 } 191 192 196 public Task getRootTask() { 197 return rootTask; 198 } 199 200 204 public void addClusterTask(ClusterTasks ct) { 205 clusterTasks.add(ct); 206 } 207 208 211 public List getClusterTasks() { 212 return clusterTasks; 213 } 214 215 219 public void log(String msg) { 220 221 if (rootTask != null) { 222 rootTask.log(msg); 223 } 224 } 225 226 229 public abstract void generatesTasks(); 230 } | Popular Tags |