KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > ant > node > AntProject


1 package org.enhydra.kelp.ant.node;
2
3
4 //AntKelp imports
5
import org.enhydra.kelp.ant.AntFacade;
6 import org.enhydra.kelp.ant.node.AntNodeReader;
7 //Kelp imports
8
import org.enhydra.kelp.common.node.OtterNode;
9 import org.enhydra.kelp.common.node.OtterFolderNode;
10 import org.enhydra.kelp.common.node.OtterDocumentNode;
11 import org.enhydra.kelp.common.node.OtterProject;
12 import org.enhydra.kelp.common.node.OtterFileNode;
13 import org.enhydra.kelp.common.node.OtterTextFileNode;
14 import org.enhydra.kelp.common.node.OtterNodeFactory;
15 //Toolbox imports
16
import org.enhydra.tool.common.PathHandle;
17 import org.enhydra.tool.ToolBoxInfo;
18 // JDK
19
import java.io.File JavaDoc;
20 import java.util.ArrayList JavaDoc;
21 import java.io.FileReader JavaDoc;
22 import java.io.BufferedReader JavaDoc;
23 import java.io.IOException JavaDoc;
24 import java.io.FileWriter JavaDoc;
25 import java.io.BufferedWriter JavaDoc;
26 import java.io.PrintWriter JavaDoc;
27 import java.util.HashMap JavaDoc;
28
29 /**
30  * <p>Title: </p>
31  * <p>Description: This class implementing OtterProject independet from IDE. It
32  * use <code>build.xml</code> file for holding properties and <code>Ant tool
33  * </code> for: XML compiling, DODS generator and application deploing. When
34  * this class is instantiaded, must call <code>setWorkingPath()</code> where
35  * <code>build.xml</code> file is placed.
36  * </p>
37  * <p>Copyright: Copyright (c) 2003</p>
38  * <p>Company: </p>
39  * @author Damir Milovic
40  * @version 1.0
41  */

42
43 public class AntProject extends OtterProject {
44
45     //Ant Project property keys:
46
public final static String JavaDoc PROJECT_NAME = "project.name";
47     public final static String JavaDoc RESOURCES_DIR = "resources.dir";
48     public final static String JavaDoc SRC_DIR = "src.dir";
49     public final static String JavaDoc CLASSES_DIR = "classes.dir";
50     public final static String JavaDoc CLASS_PATH = "class.path";
51     public final static String JavaDoc ENHYDRA_DIR = "enhydra.dir";
52     public final static String JavaDoc OUTPUT_FILE_NAME = "output.file.name"; //log file
53
//XMLC
54
public final static String JavaDoc XMLC_INVOKE = "xmlc.invoke";
55     public final static String JavaDoc XMLC_VERBOSE = "xmlc.verbose";
56     public final static String JavaDoc XMLC_PACKAGE_NAME = "xmlc.package.name";
57     public final static String JavaDoc XMLC_LOG_ENABLED = "xmlc.log.enabled";
58     public final static String JavaDoc XMLC_DEFAULT_PACKAGE = "xmlc.default.package"; //for internal use
59
public final static String JavaDoc XMLC_GENERETED_SRC_DIR ="xmlc.src.dir";
60     public final static String JavaDoc XMLC_OPTIONS_FILE = "xmlc.options.file";
61     public final static String JavaDoc XMLC_INCLUDES = "xmlc.includes";
62     public final static String JavaDoc XMLC_RESOURCES_ALL = "xmlc.resources.all";
63     public final static String JavaDoc XMLC_RESOURCES_SELECTED = "xmlc.resources.selected";
64     public final static String JavaDoc XMLC_RESOURCE_EXTENSIONS = "xmlc.resources.all";
65     //Deployer
66
public final static String JavaDoc DEPLOY_INVOKE = "deploy.invoke";
67     public final static String JavaDoc DEPLOY_CONTENT_ENABLED = "deploy.content.enabled";
68     public final static String JavaDoc DEPLOY_INPUT_ENABLED = "deploy.input.enabled";
69     public final static String JavaDoc DEPLOY_WAR_ENABLED = "deploy.war.enabled";
70     public final static String JavaDoc DEPLOY_WAR_ENHYDRA_LIBS = "deploy.war.enhydra.libs";
71     private final static String JavaDoc DEPLOY_WAR_ENHYDRA_LIBS_TRUE = "enhydra.libs.true";
72     private final static String JavaDoc DEPLOY_WAR_ENHYDRA_LIBS_FALSE = "enhydra.libs.false";
73     public final static String JavaDoc INPUT_DIR = "input.dir";
74     public final static String JavaDoc OUTPUT_DIR = "output.dir";
75     public final static String JavaDoc CONTENT_DIR = "content.dir";
76     public final static String JavaDoc CONTENT_PACKAGE_DIR = "content.package.dir";
77     public final static String JavaDoc CONTENT_TYPE_EXTENSIONS = "content.types.selected";
78     //DODS
79
public final static String JavaDoc DODS_GENERATED_SRC_DIR = "dods.src.dir";
80     public final static String JavaDoc DODS_DOML = "dods.doml";
81     public final static String JavaDoc DODS_ACTION = "dods.action";
82     public final static String JavaDoc DODS_TEMPLATE_SET = "dods.template.set";
83     public final static String JavaDoc DODS_INVOKE = "dods.invoke";
84
85
86     private String JavaDoc workingDir = null;
87     private String JavaDoc enhydraDir = ToolBoxInfo.getEnhydraRoot();
88     private String JavaDoc rootPath;
89     private AntNodeFactory factory = new AntNodeFactory();
90     private AntFacade antFacade = null;
91     private boolean webType;
92     private AntNodeReader nodeReader = null;
93     private String JavaDoc outputFileName = null;
94     private boolean outputFileEnabled = false;
95     private String JavaDoc defaultPackage = "";
96
97     public AntProject(String JavaDoc rootPath) throws Exception JavaDoc {
98         workingDir = rootPath;
99         antFacade = new AntFacade(this);
100         webType = true;
101         nodeReader = new AntNodeReader(this);
102         defaultPackage = new String JavaDoc(this.getProperty(PROJECT_NAME)+".presentation");
103         if (antFacade.getPropertyLocation(CONTENT_DIR) == null) {
104             webType = false;
105         }
106     }
107
108     public OtterFileNode[] getAllInput() {
109         return nodeReader.getTextFileNodes(this.getProperty(AntProject.INPUT_DIR));
110     }
111     public void configureRunClass() {
112         /**@todo: implement this org.enhydra.kelp.common.node.OtterProject abstract method*/
113     }
114     public OtterFileNode[] findFileNodesByType(String JavaDoc[] parm1) {
115         return new OtterFileNode[0];
116         /**@todo: implement this org.enhydra.kelp.common.node.OtterProject abstract method*/
117     }
118     public void save() {
119         antFacade.save();
120     }
121     public OtterDocumentNode[] getAllDocuments() {
122         return nodeReader.getDocumentNodes(this.getProperty(AntProject.RESOURCES_DIR));
123     }
124     /**
125      * AntXMLCTool call this method when selection is changed
126      * @param docNodes
127      */

128     public void setAllDocuments(OtterDocumentNode[] docNodes){
129
130         ArrayList JavaDoc selectedList = new ArrayList JavaDoc();
131         for(int i=0;i<docNodes.length;i++){
132             if(docNodes[i].isSelected())
133                 selectedList.add(docNodes[i]);
134         }
135         Object JavaDoc[] objs = selectedList.toArray();
136         OtterDocumentNode[] selectedDocNodes = new OtterDocumentNode[objs.length];
137         for(int i=0;i<objs.length;i++){
138             selectedDocNodes[i] = (OtterDocumentNode)objs[i];
139         }
140
141         if(selectedDocNodes.length == docNodes.length){ //All documents are selected
142
this.setProperty(this.XMLC_INCLUDES,this.XMLC_RESOURCES_ALL); //Set all for XML compilation
143
antFacade.replacePatternset(this.XMLC_RESOURCES_SELECTED, new String JavaDoc[0]); //clear previous selected docs
144
}else{
145             String JavaDoc resourceDir = relativeToAbsolute(getProperty(this.RESOURCES_DIR));
146             this.setProperty(this.XMLC_INCLUDES,this.XMLC_RESOURCES_SELECTED);//Set selected for XML compilation
147
String JavaDoc[] selectedPaths = new String JavaDoc[selectedDocNodes.length];
148             for(int i=0;i<selectedDocNodes.length;i++){
149                 selectedPaths[i] = selectedDocNodes[i].getFilePath();
150                 selectedPaths[i] = absoluteToRelative(resourceDir, selectedPaths[i]);//make relative to resources dir
151
}
152             antFacade.replacePatternset(this.XMLC_RESOURCES_SELECTED, selectedPaths);
153         }
154     }
155     /**
156      * Get selected documents for XMLC from build.xml file
157      * @return selected documents
158      */

159     public OtterDocumentNode[] getSelectedDocuments() {
160         String JavaDoc[] docPaths = antFacade.getPatternset(this.XMLC_RESOURCES_SELECTED);
161         OtterDocumentNode[] docNodes = null;
162         if(docPaths!=null){
163             docNodes = new OtterDocumentNode[docPaths.length];
164             for(int i=0; i<docPaths.length; i++){
165                 docNodes[i] = factory.createDocumentNode(this, resourceRelativeToAbsolute(docPaths[i]));
166             }
167         }else{
168             docNodes = new OtterDocumentNode[0];
169         }
170         return docNodes;
171     }
172     public String JavaDoc getRootPath() {
173         return getWorkingPath(); //FIXME, for now it is the same
174
}
175
176     public Object JavaDoc getNativeNode() {
177         return null;
178         /**@todo: implement this org.enhydra.kelp.common.node.OtterProject abstract method*/
179     }
180     public String JavaDoc getProperty(String JavaDoc property) {
181         String JavaDoc s = null;
182         if (property.equalsIgnoreCase(NAME_WORKING_DIR)){
183             s = workingDir;
184         } else if(property.equalsIgnoreCase(ENHYDRA_DIR)){
185             s = enhydraDir;
186         } else if(property.equalsIgnoreCase(RESOURCES_DIR)){
187             s = relativeToAbsolute(antFacade.getPropertyValue(RESOURCES_DIR));
188         } else if(property.equalsIgnoreCase(DODS_DOML)){
189             s = relativeToAbsolute(antFacade.getPropertyLocation(DODS_DOML));
190         } else if (property.equalsIgnoreCase(AntProject.XMLC_INVOKE)) {
191             boolean checkInvoke = antFacade.checkDependedTarget("make","xmlc");
192             if(checkInvoke)
193                 s = "true";
194             else
195                 s = "false";
196         } else if (property.equalsIgnoreCase(AntProject.DODS_INVOKE)) {
197             boolean checkInvoke = antFacade.checkDependedTarget("make","dods");
198             if(checkInvoke)
199                 s = "true";
200             else
201                 s = "false";
202         } else if (property.equalsIgnoreCase(AntProject.DODS_TEMPLATE_SET)) {
203             s = antFacade.getPropertyValue(property);
204         } else if (property.equalsIgnoreCase(AntProject.DODS_ACTION)) {
205             s = antFacade.getPropertyValue(property);
206         } else if (property.equalsIgnoreCase(AntProject.DEPLOY_CONTENT_ENABLED)) {
207             boolean checkInvoke = antFacade.checkDependedTarget("deploy","content");
208             if(checkInvoke)
209                 s = "true";
210             else
211                 s = "false";
212         } else if (property.equalsIgnoreCase(AntProject.DEPLOY_INPUT_ENABLED)) {
213             boolean checkInvoke = antFacade.checkDependedTarget("deploy","input");
214             if(checkInvoke)
215                 s = "true";
216             else
217                 s = "false";
218         } else if (property.equalsIgnoreCase(AntProject.DEPLOY_WAR_ENABLED)) {
219             boolean checkInvoke = antFacade.checkDependedTarget("deploy","makeWAR");
220             if(checkInvoke)
221                 s = "true";
222             else
223                 s = "false";
224         } else if (property.equalsIgnoreCase(AntProject.DEPLOY_INVOKE)) {
225             boolean checkInvoke = antFacade.checkDependedTarget("make","deploy");
226             if(checkInvoke)
227                 s = "true";
228             else
229                 s = "false";
230         } else if (property.equalsIgnoreCase(AntProject.DEPLOY_WAR_ENHYDRA_LIBS)) {
231             String JavaDoc value = antFacade.getPropertyValue(property);
232             if(value.equalsIgnoreCase(this.DEPLOY_WAR_ENHYDRA_LIBS_TRUE))
233                 s = "true";
234             else
235                 s = "false";
236         } else if (property.equalsIgnoreCase(AntProject.OUTPUT_FILE_NAME)) {
237             s = outputFileName;
238         } else if (property.equalsIgnoreCase(AntProject.XMLC_DEFAULT_PACKAGE)) {
239             s = defaultPackage;
240         } else if (s == null) {
241             if ((s = antFacade.getPropertyValue(property)) == null)
242                 s = relativeToAbsolute(antFacade.getPropertyLocation(property));
243         }
244         return s;
245
246     }
247
248     public void setProperty(String JavaDoc property, String JavaDoc value) {
249         if(property.equalsIgnoreCase(DEPLOY_INVOKE)){
250             if (value.equalsIgnoreCase("true")) {
251                 antFacade.addDependedTarget("make", "deploy");
252             }
253             else {
254                 antFacade.removeDependedTarget("make", "deploy");
255             }
256         } else if(property.equalsIgnoreCase(OUTPUT_DIR)) {
257             String JavaDoc relativePath = absoluteToRelative(this.getWorkingPath(),value);
258             antFacade.setPropertyLocation(property, relativePath);
259         } else if(property.equalsIgnoreCase(DODS_DOML)) {
260             String JavaDoc relativePath = absoluteToRelative(this.getWorkingPath(),value);
261             antFacade.setPropertyLocation(property, relativePath);
262         } else if(property.equalsIgnoreCase(DODS_ACTION)) {
263             antFacade.setPropertyValue(property, value);
264         } else if(property.equalsIgnoreCase(DODS_TEMPLATE_SET)) {
265             antFacade.setPropertyValue(property, value);
266         } else if(property.equalsIgnoreCase(INPUT_DIR)) {
267             String JavaDoc relativePath = absoluteToRelative(this.getWorkingPath(),value);
268             antFacade.setPropertyLocation(property, relativePath);
269         } else if(property.equalsIgnoreCase(DEPLOY_INPUT_ENABLED)){
270             if (value.equalsIgnoreCase("true")) {
271                 antFacade.addDependedTarget("deploy", "input");
272             }
273             else {
274                 antFacade.removeDependedTarget("deploy", "input");
275             }
276         } else if(property.equalsIgnoreCase(DEPLOY_CONTENT_ENABLED)){
277             if (value.equalsIgnoreCase("true")) {
278                 antFacade.addDependedTarget("deploy", "content");
279             }
280             else {
281                 antFacade.removeDependedTarget("deploy", "content");
282             }
283         } else if(property.equalsIgnoreCase(DEPLOY_WAR_ENABLED)){
284             if (value.equalsIgnoreCase("true")) {
285                 antFacade.addDependedTarget("deploy", "makeWAR");
286             }
287             else {
288                 antFacade.removeDependedTarget("deploy", "makeWAR");
289             }
290         } else if(property.equalsIgnoreCase(DEPLOY_WAR_ENHYDRA_LIBS)){
291             if (value.equalsIgnoreCase("true"))
292                 antFacade.setPropertyValue(property,DEPLOY_WAR_ENHYDRA_LIBS_TRUE);
293             else
294                 antFacade.setPropertyValue(property,DEPLOY_WAR_ENHYDRA_LIBS_FALSE);
295
296         } else if(property.equalsIgnoreCase(XMLC_OPTIONS_FILE)){
297             antFacade.setPropertyValue(property, value);
298         } else if(property.equalsIgnoreCase(XMLC_INVOKE)){
299             if (value.equalsIgnoreCase("true")) {
300                 antFacade.addDependedTarget("make", "xmlc");
301             }
302             else {
303                 antFacade.removeDependedTarget("make", "xmlc");
304             }
305         }else if(property.equalsIgnoreCase(DODS_INVOKE)){
306             if (value.equalsIgnoreCase("true")) {
307                 antFacade.addDependedTarget("make", "dods");
308             }
309             else {
310                 antFacade.removeDependedTarget("make", "dods");
311             }
312         } else if(property.equalsIgnoreCase(XMLC_VERBOSE)) {
313             antFacade.setPropertyValue(property, value);
314         } else if(property.equalsIgnoreCase(XMLC_PACKAGE_NAME)) {
315             antFacade.setPropertyValue(property, value);
316         } else if(property.equalsIgnoreCase(OUTPUT_FILE_NAME)) {
317             outputFileName = value;
318         }else if(property.equalsIgnoreCase(this.XMLC_INCLUDES)) {
319             antFacade.setPropertyValue(property,value);
320         }
321         //antFacade.setProperty(property,value);
322
}
323
324     public void setProperty(String JavaDoc property, int value) {
325         setProperty(property,Integer.toString(value));
326     }
327
328     public void setNativeNode(Object JavaDoc parm1) {
329         ;//Don't need NativeNode any more
330
}
331     public String JavaDoc[] getSourcePathArray() {
332         //FIXME include /src and genereted sources dirs (xmlc & dods)
333
return null;
334     }
335
336     public String JavaDoc getSourcePath() {
337         return getProperty(AntProject.SRC_DIR);
338     }
339     public boolean isOpenBuild() {
340         return true;
341         /**@todo: implement this org.enhydra.kelp.common.node.OtterProject abstract method*/
342     }
343     public String JavaDoc getClassPath() {
344         //return rootPath+"/classes";
345
return getProperty(AntProject.CLASS_PATH);//FIXME TODO MAYBE implement method getClassPath() in antFacade
346
}
347     public boolean isDefaultProject() {
348         return false;
349     }
350     public OtterTextFileNode[] getAllDeploymentDescs() {
351         return new OtterTextFileNode[0]; //FIXME
352

353     }
354     public Object JavaDoc getNativeProject() {
355         return null; //No native project for now
356
}
357     public OtterNodeFactory getNodeFactory() {
358         return factory;
359
360     }
361     public OtterNode getParent() {
362         return null;
363     }
364
365     public String JavaDoc getWorkingPath() {
366         return getProperty(NAME_WORKING_DIR); //FIXME for now workingPath = rootPath
367
}
368
369     public void setWorkingPath(String JavaDoc path) {
370         setProperty(NAME_WORKING_DIR,path);
371     }
372     public OtterProject getProject() {
373         return this;
374     }
375     public String JavaDoc getClassOutputPath() {
376         return getProperty(AntProject.CLASSES_DIR);
377     }
378     public void setClassOutputPath(String JavaDoc p) {
379         setProperty(AntProject.CLASSES_DIR,p);
380     }
381     public String JavaDoc getCodeGenDefaultDestination() {
382         return rootPath+"/xmlc_generated_source"; //FIXME read from build.xml
383

384     }
385     public void setSourcePathArray(String JavaDoc[] parm1) {
386         /**@todo: implement this org.enhydra.kelp.common.node.OtterProject abstract method*/
387     }
388
389     public OtterTextFileNode getFirstPolicy() {
390         return null;
391         /**@todo: implement this org.enhydra.kelp.common.node.OtterProject abstract method*/
392     }
393
394     /**
395      * Converts relative paths from "foo" to "./foo" to comply with
396      * PathHandle.expandRelativePath()
397      */

398     private String JavaDoc relativePathAdapter(String JavaDoc path) {
399         String JavaDoc newPath = null;
400         File JavaDoc file = new File JavaDoc(path);
401         if (!file.isAbsolute())
402             newPath = "./" + path;
403         else
404             newPath = path;
405         return newPath;
406     }
407     /**
408      * Make absolute path from path relative to working dir.
409      * @param relativePath Relative path
410      * @return Absolute path
411      */

412     private String JavaDoc relativeToAbsolute(String JavaDoc relativePath){
413         if(relativePath!=null){
414             PathHandle workDirHandle = PathHandle.createPathHandle(workingDir);
415             PathHandle absoluteHandle = workDirHandle.expandRelativePath(relativePathAdapter(relativePath));
416             return absoluteHandle.getPath();
417         }else
418             return null;
419     }
420
421     private String JavaDoc resourceRelativeToAbsolute(String JavaDoc relativePath){
422         if(relativePath!=null){
423             String JavaDoc resourceDir = relativeToAbsolute(getProperty(this.RESOURCES_DIR));
424             PathHandle resourseHandle = PathHandle.createPathHandle(resourceDir);
425             PathHandle absoluteHandle = resourseHandle.expandRelativePath(relativePathAdapter(relativePath));
426             return absoluteHandle.getPath();
427         }else
428             return null;
429     }
430     
431     private String JavaDoc absoluteToRelative(String JavaDoc homePath,String JavaDoc inPath){
432         PathHandle homePathHandle = PathHandle.createPathHandle(homePath);
433         PathHandle inPathHandle = PathHandle.createPathHandle(inPath);
434         String JavaDoc relativePath = homePathHandle.getRelativePath(inPathHandle);
435         //cut "./"
436
if(relativePath.startsWith("./"))
437             relativePath = relativePath.substring(2);
438         return relativePath;
439     }
440     /**
441      * Read options from file
442      * @return lines from xmlc options file
443      */

444     public String JavaDoc[] getXMLCOptionsFileParams() {
445         String JavaDoc optFilePath = getProperty(AntProject.XMLC_OPTIONS_FILE);
446         optFilePath = relativePathAdapter(optFilePath);
447         PathHandle resourcesHandle =
448                 PathHandle.createPathHandle(getProperty(AntProject.RESOURCES_DIR));
449         PathHandle optFileHandle = resourcesHandle.expandRelativePath(optFilePath);
450         FileReader JavaDoc optFileReader = null;
451         BufferedReader JavaDoc br = null;
452         ArrayList JavaDoc optionsList = new ArrayList JavaDoc();
453         try {
454             optFileReader = new FileReader JavaDoc(optFileHandle.getFile());
455             br = new BufferedReader JavaDoc(optFileReader, 4096);
456             String JavaDoc optLine = br.readLine();
457             while(optLine != null) {
458                 if (!optLine.equals(""))
459                     optionsList.add(optLine);
460                 optLine = br.readLine();
461             }
462             br.close();
463         }
464         catch (IOException JavaDoc ex) {
465             ex.printStackTrace();
466         }
467         Object JavaDoc[] objs = optionsList.toArray();
468         String JavaDoc[] options = new String JavaDoc[objs.length];
469         for (int i = 0; i < objs.length; i++) {
470             options[i] = (String JavaDoc)objs[i];
471         }
472
473         return options;
474     }
475
476     /**
477      * Write options to file
478      * @param options XMLC options
479      */

480     public void setXMLCOptionsFileParams(String JavaDoc[] options) {
481         String JavaDoc optFilePath = getProperty(AntProject.XMLC_OPTIONS_FILE);
482         optFilePath = relativePathAdapter(optFilePath);
483         PathHandle resourcesHandle =
484                 PathHandle.createPathHandle(getProperty(AntProject.RESOURCES_DIR));
485         PathHandle optFileHandle = resourcesHandle.expandRelativePath(optFilePath);
486         FileWriter JavaDoc fw;
487         try {
488             fw = new FileWriter JavaDoc(optFileHandle.getFile());
489             } catch(IOException JavaDoc e) {return;}
490             BufferedWriter JavaDoc bw = new BufferedWriter JavaDoc(fw, 4096);
491             PrintWriter JavaDoc prw = new PrintWriter JavaDoc(bw, false /* auto flush */);
492             for (int i = 0; i < options.length; i++) {
493                 prw.println(options[i]);
494             }
495             prw.println();
496             prw.flush();
497             prw.close();
498     }
499
500     /**
501      *
502      * @return true if application type is web, otherwise it is enhydra app
503      */

504     public boolean isWebType() {
505         return webType;
506     }
507
508     public String JavaDoc[] getExtensions(String JavaDoc patternsetId) {
509         String JavaDoc[] extensions = antFacade.getPatternset(patternsetId);
510         for (int i = 0; i < extensions.length; i++) {
511             extensions[i] = extensions[i].substring(extensions[i].indexOf("**/*.")+5);
512             extensions[i] = extensions[i].trim();
513         }
514         return extensions;
515     }
516
517     public void setExtensions(String JavaDoc patternsetId, String JavaDoc[] extensions) {
518         String JavaDoc[] expandedExts = new String JavaDoc[extensions.length];
519         for (int i = 0; i < extensions.length; i++) {
520             expandedExts[i] = "**/*." + extensions[i];
521         }
522         antFacade.replacePatternset(patternsetId, expandedExts);
523     }
524
525
526     public HashMap JavaDoc getReplacements() {
527         return antFacade.getInputFilters();
528     }
529
530     public void setReplacements(HashMap JavaDoc replacements) {
531         antFacade.replaceInputFilters(replacements);
532     }
533
534     public boolean isOutputFileEnabled() {
535         return outputFileEnabled;
536     }
537
538     public void setOutputFileEnabled(boolean enable) {
539         outputFileEnabled = enable;
540     }
541
542     /**
543      * Method declaration
544      *
545      *
546      * @return
547      */

548     public String JavaDoc getOutputFilename() {
549         String JavaDoc out = null;
550
551         out = getProperty(OUTPUT_FILE_NAME);
552         return out;
553     }
554
555     /**
556      * Method declaration
557      *
558      *
559      * @param n
560      */

561     public void setOutputFilename(String JavaDoc n) {
562         setProperty(OUTPUT_FILE_NAME, n);
563     }
564 }
565
566
Popular Tags