KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > ant > cluster > WsdlPublishCluster


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2005 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer: Benoit Pelletier
22  * --------------------------------------------------------------------------
23  * $Id: WsdlPublishCluster.java,v 1.1 2005/06/07 08:21:27 pelletib Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas.ant.cluster;
28
29
30 import java.util.ArrayList JavaDoc;
31 import java.util.List JavaDoc;
32
33 import org.objectweb.jonas.ant.jonasbase.wsdl.File;
34 import org.objectweb.jonas.ant.jonasbase.wsdl.Uddi;
35 import org.objectweb.jonas.ant.jonasbase.wsdl.WsdlPublish;
36
37
38 /**
39  * Define WsdlPublishCluster task
40  * @author Benoit Pelletier
41  */

42 public class WsdlPublishCluster extends ClusterTasks {
43
44     /**
45      * Info for the logger
46      */

47     private static final String JavaDoc INFO = "[WsdlPublishCluster] ";
48
49
50     /**
51      * List of files (WSDL publish)
52      */

53     private List JavaDoc files = new ArrayList JavaDoc();
54
55     /**
56      * List of uddi (WSDL publish)
57      */

58     private List JavaDoc uddis = new ArrayList JavaDoc();
59
60     /**
61      * Add file (wsdl publish)
62      * @param file properties file
63      */

64     public void addConfiguredFile(File file) {
65         files.add(file);
66     }
67
68     /**
69      * Add UDDI (wsdl publish)
70      * @param uddi properties file
71      */

72     public void addConfiguredUddi(Uddi uddi) {
73         uddis.add(uddi);
74     }
75     /**
76      * Generates the mail tasks for each JOnAS's instances
77      */

78     public void generatesTasks() {
79
80         for (int i = getDestDirSuffixIndFirst(); i <= getDestDirSuffixIndLast(); i++) {
81
82             String JavaDoc destDir = getDestDir(getDestDirPrefix(), i);
83
84             log(INFO + "tasks generation for " + destDir);
85
86             // creation of the Mail task
87
WsdlPublish wsdl = new WsdlPublish();
88
89             wsdl.setFiles(files);
90             wsdl.setUddis(uddis);
91
92             wsdl.setDestDir(new java.io.File JavaDoc(destDir));
93
94             addTask(wsdl);
95
96         }
97     }
98 }
Popular Tags