OSDN Git Service

Initial commit
[ultramonkey-l7/l7gui.git] / src / src / org / ultramonkey / l7 / controller / LogFileData.java
1 package org.ultramonkey.l7.controller;
2
3 import java.util.Date;
4 import java.io.Serializable;
5
6 import org.apache.log4j.Logger;
7 import org.ultramonkey.l7.model.LogCategorySet;
8
9 /**
10  * 
11  * <p>class LogFileData</p>
12  * <p>Copyright(c) NTT COMWARE 2008</p>
13  * @author tanuma
14  */
15 public class LogFileData implements Serializable {
16     static final long serialVersionUID = 1;
17
18     /**
19      * file name (ex. l7vsd.log, l7vsadm.log.2)
20      */
21     public String fileName;
22     
23     /**
24      * file path include file name (ex. /var/log/l7vsd.log.4)
25      */
26     public String filePath;
27     
28     /**
29      * file size
30      */
31         public long size;
32         
33         /**
34          * file mdate
35          */
36         public Date time;
37         
38         /**
39          * 
40          * Constructor
41          *
42          */
43         public LogFileData() {
44         // --- debug log (constructor) ---
45                 Logger ioFileLogger = Logger.getLogger(LogCategorySet.GUI_IO_FILE);
46         if (ioFileLogger.isDebugEnabled()) {
47             ioFileLogger.debug("11520 class LogFileData created.");
48         }
49         // --- debug log (constructor) ---
50
51         this.fileName = null;
52                 this.filePath = null;
53                 this.size = 0;
54                 this.time = new Date();
55         }
56         
57         /**
58          * 
59          * Constructor
60          *
61          * @param fileName
62          * @param filePath
63          * @param size
64          * @param time
65          */
66         public LogFileData(String fileName, String filePath, long size, Date time) {
67         // --- debug log (constructor) ---
68                 Logger ioFileLogger = Logger.getLogger(LogCategorySet.GUI_IO_FILE);
69         if (ioFileLogger.isDebugEnabled()) {
70             ioFileLogger.debug("11521 class LogFileData created.");
71         }
72         // --- debug log (constructor) ---
73
74                 this.fileName = fileName;
75                 this.filePath = filePath;
76                 this.size = size;
77                 this.time = time;
78         }
79         
80         /**
81          * 
82          * {@inheritDoc}
83          */
84         public String toString() {
85                 return
86                         "fileName=\"" + this.fileName + "\", " +
87                         "filePath=\"" + this.filePath + "\", " +
88                         "size=" + this.size + ", " +
89                         "time=(" + this.time + ")";
90         }
91 }