KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > task > IR3Feed


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Christophe Demarey.
23 Contributor(s): ________________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.task;
28
29 // Package dependencies
30
import java.util.Iterator JavaDoc;
31 import java.util.Map JavaDoc;
32
33 /**
34  * This task feeds an IDL / PSDL / CIDL file in the OpenCCM Interface Repository.
35  *
36  * @author <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</a>
37  *
38  * @version 0.1
39  */

40 public class IR3Feed
41      extends CompilerBase
42   implements Runnable JavaDoc
43 {
44     // ==================================================================
45
//
46
// Internal states.
47
//
48
// ==================================================================
49

50     /** List of files to feed. */
51     private java.util.List JavaDoc files_;
52
53     // ==================================================================
54
//
55
// Constructors.
56
//
57
// ==================================================================
58

59     /**
60      * The default constructor.
61      *
62      * @param project_properties - Properties of the Ant Project.
63      */

64     public IR3Feed(Map JavaDoc project_properties)
65     {
66         // Call CompilerBase constructor
67
super(project_properties);
68
69         // Init internal states
70
files_ = new java.util.ArrayList JavaDoc();
71     }
72     
73     // ==================================================================
74
//
75
// Internal methods.
76
//
77
// ==================================================================
78

79     // ==================================================================
80
//
81
// Public methods.
82
//
83
// ==================================================================
84

85     /**
86      * Configure the task.
87      */

88     public void
89     configure()
90     {
91         Iterator JavaDoc it = null;
92
93         // Call the CompilerBase configure method
94
compiler_configure();
95         
96         // Add include declarations
97
if (files_.size() > 0)
98         {
99             for (it = files_.iterator(); it.hasNext(); )
100             {
101                 addArgument( (String JavaDoc) it.next() );
102             }
103         }
104         else
105         {
106             addArgument(file_);
107         }
108
109         // Configure the task
110
addProperty( "OpenCCM_CONFIG_DIR",
111                 project_properties_.getProperty("OpenCCM_CONFIG_DIR") );
112
113         setXmlFile( project_properties_.getProperty("OpenCCM_HOMEDIR") + "/xml/launcher/IR3Feed.xml" );
114     }
115
116     /**
117      * Add a file to feed.
118      *
119      * @param str - The file name.
120      */

121     public void
122     addConfiguredFile(StringType str)
123     {
124         files_.add(str.getName());
125     }
126 }
127
Popular Tags