KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > plugin > massivecompiler > FileEntry


1 /*
2  * Copyright (C) 2005 - 2006 JasperSoft Corporation. All rights reserved.
3  * http://www.jaspersoft.com.
4  *
5  * Unless you have purchased a commercial license agreement from JasperSoft,
6  * the following license terms apply:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as published by
10  * the Free Software Foundation.
11  *
12  * This program is distributed WITHOUT ANY WARRANTY; and without the
13  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
18  * or write to:
19  *
20  * Free Software Foundation, Inc.,
21  * 59 Temple Place - Suite 330,
22  * Boston, MA USA 02111-1307
23  *
24  *
25  *
26  *
27  * FileEntry.java
28  *
29  * Created on 20 maggio 2004, 8.16
30  *
31  */

32
33 package it.businesslogic.ireport.plugin.massivecompiler;
34
35 import java.io.*;
36 /**
37  *
38  * @author Administrator
39  */

40 public class FileEntry {
41     
42     public static final int STATUS_NOT_COMPILED = 1;
43     public static final int STATUS_COMPILED = 2;
44     public static final int STATUS_ERROR_COMPILING = 3;
45     public static final int STATUS_COMPILED_GROOVY = 4;
46     public static final int STATUS_COMPILING = 5;
47     
48     private File file = null;
49     private int status = 0;
50     private String JavaDoc message = "";
51     private String JavaDoc jasper_version = "";
52     
53     /** Creates a new instance of FileEntry */
54     public FileEntry() {
55     }
56     
57     
58     /** Getter for property message.
59      * @return Value of property message.
60      *
61      */

62     public java.lang.String JavaDoc getMessage() {
63         return message;
64     }
65     
66     /** Setter for property message.
67      * @param message New value of property message.
68      *
69      */

70     public void setMessage(java.lang.String JavaDoc message) {
71         this.message = message;
72     }
73     
74     /** Getter for property status.
75      * @return Value of property status.
76      *
77      */

78     public int getStatus() {
79         return status;
80     }
81     
82     /** Getter for property status.
83      * @return Value of property status.
84      *
85      */

86     public static String JavaDoc decodeStatus( int status ) {
87         // Decode the status...
88
switch (status)
89         {
90             case STATUS_NOT_COMPILED: return "Not compiled";
91             case STATUS_COMPILED: return "Compiled";
92             case STATUS_COMPILED_GROOVY: return "Compiled (groovy compiler)";
93             case STATUS_ERROR_COMPILING: return "Error compiling";
94             case STATUS_COMPILING: return "Compiling...";
95         }
96         return ""+status;
97     }
98     
99     /** Setter for property status.
100      * @param status New value of property status.
101      *
102      */

103     public void setStatus(int status) {
104         this.status = status;
105     }
106     
107     /** Getter for property file.
108      * @return Value of property file.
109      *
110      */

111     public File getFile() {
112         return file;
113     }
114     
115     /** Setter for property file.
116      * @param file New value of property file.
117      *
118      */

119     public void setFile(File file) {
120         this.file = file;
121     }
122     
123     public String JavaDoc toString()
124     {
125         if (file == null) return "";
126         try {
127         return file.getCanonicalPath();
128         }catch (Exception JavaDoc ex) {}
129         return "";
130     }
131     
132     /** Getter for property jasper_version.
133      * @return Value of property jasper_version.
134      *
135      */

136     public java.lang.String JavaDoc getJasper_version() {
137         return jasper_version;
138     }
139     
140     /** Setter for property jasper_version.
141      * @param jasper_version New value of property jasper_version.
142      *
143      */

144     public void setJasper_version(java.lang.String JavaDoc jasper_version) {
145         this.jasper_version = jasper_version;
146     }
147     
148 }
149
Popular Tags