1 26 27 package org.objectweb.jonas.ant.cluster; 28 29 import java.util.Iterator ; 30 31 35 public class Common extends ClusterTasks { 36 37 40 private static final String INFO = "[Common] "; 41 42 45 public Common() { 46 super(); 47 } 48 49 53 public void addConfiguredCarolCluster(CarolCluster carolCluster) { 54 carolCluster.setRootTask(getRootTask()); 55 log(INFO + "CarolCluster added"); 56 carolCluster.setLogInfo("CarolCluster"); 57 addClusterTask(carolCluster); 58 } 59 60 64 public void addConfiguredDbCluster(DbCluster dbCluster) { 65 dbCluster.setRootTask(getRootTask()); 66 log(INFO + "DbCluster added"); 67 dbCluster.setLogInfo("DbCluster"); 68 addClusterTask(dbCluster); 69 } 70 71 75 public void addConfiguredMailCluster(MailCluster mailCluster) { 76 mailCluster.setRootTask(getRootTask()); 77 log(INFO + "MailCluster added"); 78 mailCluster.setLogInfo("MailCluster"); 79 addClusterTask(mailCluster); 80 } 81 82 86 public void addConfiguredJmsCluster(JmsCluster jmsCluster) { 87 jmsCluster.setRootTask(getRootTask()); 88 log(INFO + "JmsCluster added"); 89 jmsCluster.setLogInfo("JmsCluster"); 90 addClusterTask(jmsCluster); 91 } 92 93 97 public void addConfiguredWsdlPublishCluster(WsdlPublishCluster wsdlPublishCluster) { 98 wsdlPublishCluster.setRootTask(getRootTask()); 99 log(INFO + "WsdlPublishCluster added"); 100 wsdlPublishCluster.setLogInfo("WsdlPublishCluster"); 101 addClusterTask(wsdlPublishCluster); 102 } 103 104 108 public void addConfiguredDiscoveryCluster(DiscoveryCluster discoveryCluster) { 109 discoveryCluster.setRootTask(getRootTask()); 110 log(INFO + "DiscoveryCluster added"); 111 discoveryCluster.setLogInfo("DiscoveryCluster"); 112 addClusterTask(discoveryCluster); 113 } 114 115 118 public void generatesTasks() { 119 120 for (Iterator it = this.getClusterTasks().iterator(); it.hasNext();) { 121 ClusterTasks ct = (ClusterTasks) it.next(); 122 log(INFO + "tasks generation for " + ct.getLogInfo()); 123 ct.setArch(getArch()); 124 ct.setDestDirPrefix(getDestDirPrefix()); 125 ct.setDestDirSuffixIndFirst(getDestDirSuffixIndFirst()); 126 ct.setDestDirSuffixIndLast(getDestDirSuffixIndLast()); 127 ct.generatesTasks(); 128 addTasks(ct); 129 } 130 } 131 132 } | Popular Tags |