001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 2005 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: GenICParameters.java 7472 2005-10-06 08:48:25Z sauthieg $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas_ejb.genic;
025:
026: import java.util.ArrayList;
027:
028: import org.objectweb.jonas.container.Protocols;
029:
030: /**
031: * GenIC Parameters holder
032: *
033: * @author Guillaume Sauthier
034: */
035: public class GenICParameters {
036:
037: /**
038: * Supported protocol list
039: */
040: private Protocols protocols = null;
041:
042: /**
043: * directory where files will be generated
044: */
045: private String outputDirectory = null;
046:
047: /**
048: * is verbose mode ?
049: */
050: private boolean verbose = false;
051:
052: /**
053: * do not delete intermediate generated source files
054: */
055: private boolean keepGenerated = false;
056:
057: /**
058: * compile the generated source files via the java and
059: * rmi compilers
060: */
061: private boolean compil = true;
062:
063: /**
064: * display the help message
065: */
066: private boolean help = false;
067:
068: /**
069: * add the generated classes in the given ejb-jar
070: * file
071: */
072: private boolean addInJar = true;
073:
074: /**
075: * parse the XML deployment descriptors with
076: * validation
077: */
078: private boolean parseWithValidation = true;
079:
080: /**
081: * invoke, in some case, directly the method of the java
082: * class corresponding to the command
083: */
084: private boolean invokeCmd = false;
085:
086: /**
087: * use fastRMIC compiler
088: */
089: private boolean fastRmicEnabled = true;
090:
091: /**
092: * file name of the standard deployment descriptor (.xml ended),
093: * or file name of the EJB-jar (.jar ended).
094: */
095: private String inputFilename = null;
096:
097: /**
098: * name of the java compiler to use
099: */
100: private String javacName = null;
101:
102: /**
103: * options to pass to the java compiler
104: */
105: private ArrayList javacOptions = new ArrayList();
106:
107: /**
108: * options to pass to the rmi compiler
109: */
110: private ArrayList rmicOptions = new ArrayList();
111:
112: /**
113: * define the classpath to be used to compile classes
114: */
115: private String classpathParam = null;
116:
117: /**
118: * @return Returns the outputDirectory.
119: */
120: public String getOutputDirectory() {
121: return outputDirectory;
122: }
123:
124: /**
125: * @param outputDirectory The outputDirectory to set.
126: */
127: public void setOutputDirectory(String outputDirectory) {
128: this .outputDirectory = outputDirectory;
129: }
130:
131: /**
132: * @return Returns the protocols.
133: */
134: public Protocols getProtocols() {
135: return protocols;
136: }
137:
138: /**
139: * @param protocols The protocols to set.
140: */
141: public void setProtocols(Protocols protocols) {
142: this .protocols = protocols;
143: }
144:
145: /**
146: * @return Returns the verbose.
147: */
148: public boolean isVerbose() {
149: return verbose;
150: }
151:
152: /**
153: * @param verbose The verbose to set.
154: */
155: public void setVerbose(boolean verbose) {
156: this .verbose = verbose;
157: }
158:
159: /**
160: * @return Returns the addInJar.
161: */
162: public boolean isAddInJar() {
163: return addInJar;
164: }
165:
166: /**
167: * @param addInJar The addInJar to set.
168: */
169: public void setAddInJar(boolean addInJar) {
170: this .addInJar = addInJar;
171: }
172:
173: /**
174: * @return Returns the classpathParam.
175: */
176: public String getClasspathParam() {
177: return classpathParam;
178: }
179:
180: /**
181: * @param classpathParam The classpathParam to set.
182: */
183: public void setClasspathParam(String classpathParam) {
184: this .classpathParam = classpathParam;
185: }
186:
187: /**
188: * @return Returns the compil.
189: */
190: public boolean isCompil() {
191: return compil;
192: }
193:
194: /**
195: * @param compil The compil to set.
196: */
197: public void setCompil(boolean compil) {
198: this .compil = compil;
199: }
200:
201: /**
202: * @return Returns the fastRmicEnabled.
203: */
204: public boolean isFastRmicEnabled() {
205: return fastRmicEnabled;
206: }
207:
208: /**
209: * @param fastRmicEnabled The fastRmicEnabled to set.
210: */
211: public void setFastRmicEnabled(boolean fastRmicEnabled) {
212: this .fastRmicEnabled = fastRmicEnabled;
213: }
214:
215: /**
216: * @return Returns the help.
217: */
218: public boolean isHelp() {
219: return help;
220: }
221:
222: /**
223: * @param help The help to set.
224: */
225: public void setHelp(boolean help) {
226: this .help = help;
227: }
228:
229: /**
230: * @return Returns the inputFilename.
231: */
232: public String getInputFilename() {
233: return inputFilename;
234: }
235:
236: /**
237: * @param inputFilename The inputFilename to set.
238: */
239: public void setInputFilename(String inputFilename) {
240: this .inputFilename = inputFilename;
241: }
242:
243: /**
244: * @return Returns the invokeCmd.
245: */
246: public boolean isInvokeCmd() {
247: return invokeCmd;
248: }
249:
250: /**
251: * @param invokeCmd The invokeCmd to set.
252: */
253: public void setInvokeCmd(boolean invokeCmd) {
254: this .invokeCmd = invokeCmd;
255: }
256:
257: /**
258: * @return Returns the javacName.
259: */
260: public String getJavacName() {
261: return javacName;
262: }
263:
264: /**
265: * @param javacName The javacName to set.
266: */
267: public void setJavacName(String javacName) {
268: this .javacName = javacName;
269: }
270:
271: /**
272: * @return Returns the keepGenerated.
273: */
274: public boolean isKeepGenerated() {
275: return keepGenerated;
276: }
277:
278: /**
279: * @param keepGenerated The keepGenerated to set.
280: */
281: public void setKeepGenerated(boolean keepGenerated) {
282: this .keepGenerated = keepGenerated;
283: }
284:
285: /**
286: * @return Returns the parseWithValidation.
287: */
288: public boolean isParseWithValidation() {
289: return parseWithValidation;
290: }
291:
292: /**
293: * @param parseWithValidation The parseWithValidation to set.
294: */
295: public void setParseWithValidation(boolean parseWithValidation) {
296: this .parseWithValidation = parseWithValidation;
297: }
298:
299: /**
300: * @return Returns the javacOptions.
301: */
302: public ArrayList getJavacOptions() {
303: return javacOptions;
304: }
305:
306: /**
307: * @return Returns the rmicOptions.
308: */
309: public ArrayList getRmicOptions() {
310: return rmicOptions;
311: }
312:
313: }
|