41 |
|
* |
42 |
|
* @param propertiesStream an InputStream connected to the configuration |
43 |
|
*/ |
44 |
< |
ConfigurationServant(File configurationFile, Logger logRef) { |
45 |
< |
_lastModified = configurationFile.lastModified(); |
44 |
> |
ConfigurationServant(Properties properties, String fileList, long lastModified, Logger logRef) { |
45 |
> |
_properties = properties; |
46 |
> |
_lastModified = lastModified; |
47 |
> |
_fileList = fileList; |
48 |
|
_logRef = logRef; |
49 |
< |
|
49 |
> |
_logRef.write(this.toString(), Logger.SYSINIT, "created"); |
50 |
|
String date = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM).format(new Date(getLastModified())); |
51 |
< |
_logRef.write(this.toString(), Logger.SYSMSG, "created: " + configurationFile.getName() + "(" + date + ")" ); |
52 |
< |
|
51 |
< |
try { |
52 |
< |
InputStream configurationStream = new FileInputStream(configurationFile); |
53 |
< |
_properties.load(configurationStream); |
54 |
< |
} catch (Exception e) { |
55 |
< |
// **************************************** |
56 |
< |
// either IOException from the .load() or |
57 |
< |
// a SecurityException or FileNotFoundException from |
58 |
< |
// the inputStream, not sure what to do yet!!! |
59 |
< |
} |
51 |
> |
_logRef.write(this.toString(), Logger.SYSMSG, "last modified - " + date); |
52 |
> |
_logRef.write(this.toString(), Logger.DEBUG, "file list - " + _fileList); |
53 |
|
} |
54 |
|
|
55 |
|
//---PUBLIC METHODS--- |
93 |
|
return _lastModified; |
94 |
|
} |
95 |
|
|
96 |
+ |
public String getFileList() { |
97 |
+ |
return _fileList; |
98 |
+ |
} |
99 |
+ |
|
100 |
|
//---ATTRIBUTES--- |
101 |
|
|
102 |
|
/** |
114 |
|
* this object is using |
115 |
|
*/ |
116 |
|
private long _lastModified; |
117 |
+ |
|
118 |
+ |
private String _fileList; |
119 |
|
|
120 |
|
//---STATIC ATTRIBUTES--- |
121 |
|
|