atg.repository.loader
Interface FileSystemMonitor


public interface FileSystemMonitor

The FileSystemMonitor offers convenience methods that allow customers more control over the component's loading criteria. Specifically it allows them to specify the global timestamp values that files should be compared to, update/reload/remove specific files, and return lists of files within a particular hierarchy that have changed since a particular time. The intention here is to compensate as much as possible for those real world situations that invariably crop up in production use.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 long getLastScanned()
          Returns the value of the lastScanned property representing the time that the implementing instance most recently executed a scan of the configured filesystems.
 java.io.File getRootPath()
          Returns the file object of the root path being monitored
 java.util.Collection listUpdatedSince(long pTimestamp, java.io.File pPath, boolean pRecurse)
          Returns a collection of the files specified by the provided path which have been modified after the provided timestamp.
 void setLastScanned(long pTimestamp)
          Assigns the value of the lastScanned property representing the time that the instance last executed.
 void setRootPath(java.io.File pAbsolutePath)
          Assigns the file object of the root of the path that should be monitored.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

listUpdatedSince

java.util.Collection listUpdatedSince(long pTimestamp,
                                      java.io.File pPath,
                                      boolean pRecurse)
                                      throws atg.repository.loader.LoaderException
Returns a collection of the files specified by the provided path which have been modified after the provided timestamp. If the path is a folder and pRecurse is true then folders and files contained within the path will also be checked. If the pRecurse is false and the path is a folder only items immediately within the folder will be checked. If pPath is a file only that file is checked.

Parameters:
pTimestamp - the long value compared against each File's last modified value to determine if it has been updated
pPath - the File object to be checked
boolean - flag used to determine whether the check should be recursively against a folder's contents
Returns:
the Collection of Files meeting the provided criteria
Throws:
atg.repository.loader.LoaderException

getLastScanned

long getLastScanned()
Returns the value of the lastScanned property representing the time that the implementing instance most recently executed a scan of the configured filesystems.

Returns:
the current value of the lastScanned property

setLastScanned

void setLastScanned(long pTimestamp)
Assigns the value of the lastScanned property representing the time that the instance last executed.

Parameters:
pTimestamp - the new value of the lastScanned property

getRootPath

java.io.File getRootPath()
Returns the file object of the root path being monitored

Returns:
the File object of the root path being monitored

setRootPath

void setRootPath(java.io.File pAbsolutePath)
Assigns the file object of the root of the path that should be monitored.

Parameters:
pMonitoredFile - the File object of the root path to be monitored