1 26 27 package org.objectweb.jonas.ant.cluster; 28 29 import java.io.File ; 30 31 import org.objectweb.jonas.ant.jonasbase.Mail; 32 33 37 public class MailCluster extends ClusterTasks { 38 39 42 private static final String INFO = "[MailCluster] "; 43 44 45 48 private String type = null; 49 50 53 private String name = null; 54 55 58 private String mailTo = null; 59 60 63 private String subject = null; 64 65 69 public void setMailTo(String mailTo) { 70 this.mailTo = mailTo; 71 } 72 73 77 public void setName(String name) { 78 this.name = name; 79 } 80 81 85 public void setSubject(String subject) { 86 this.subject = subject; 87 } 88 89 93 public void setType(String type) { 94 this.type = type; 95 } 96 97 100 public MailCluster() { 101 super(); 102 } 103 104 107 public void generatesTasks() { 108 109 for (int i = getDestDirSuffixIndFirst(); i <= getDestDirSuffixIndLast(); i++) { 110 111 String destDir = getDestDir(getDestDirPrefix(), i); 112 113 Mail mail = new Mail(); 115 116 log(INFO + "tasks generation for " + destDir); 117 118 mail.setMailTo(mailTo); 119 mail.setName(name); 120 mail.setSubject(subject); 121 mail.setType(type); 122 123 mail.setDestDir(new File (destDir)); 124 125 addTask(mail); 126 127 } 128 } 129 } | Popular Tags |