Package xal.app.launcher
Class FileWatcher
- java.lang.Object
-
- xal.app.launcher.FileWatcher
-
- All Implemented Interfaces:
xal.tools.data.DataListener
public class FileWatcher extends Object implements xal.tools.data.DataListener
Watches specified folders for new files of particular types
-
-
Field Summary
Fields Modifier and Type Field Description static StringDATA_LABELDataAdaptor label used in reading and writing
-
Constructor Summary
Constructors Constructor Description FileWatcher(LaunchModel model)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdataLabel()provides the name used to identify the class in an external data source.FilegetFolder(int index)get the folder at the specified indexList<File>getFolders()get the folders to watchvoidignoreFolder(File folder)remove a folder from the watch listList<File>listFiles()list the filtered filesvoidpreConfigure()preconfigure when initializing without a document filevoidupdate(xal.tools.data.DataAdaptor adaptor)Instructs the receiver to update its data based on the given adaptor.voidwatchFolder(File folder)add a new folder to the watch listvoidwatchFolders(File[] folders)add new folders to the watch listvoidwrite(xal.tools.data.DataAdaptor adaptor)Instructs the receiver to write its data to the adaptor for external storage.
-
-
-
Field Detail
-
DATA_LABEL
public static final String DATA_LABEL
DataAdaptor label used in reading and writing- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FileWatcher
public FileWatcher(LaunchModel model)
Constructor
-
-
Method Detail
-
preConfigure
public void preConfigure()
preconfigure when initializing without a document file
-
dataLabel
public String dataLabel()
provides the name used to identify the class in an external data source.- Specified by:
dataLabelin interfacexal.tools.data.DataListener- Returns:
- The tag for this data node.
-
update
public void update(xal.tools.data.DataAdaptor adaptor)
Instructs the receiver to update its data based on the given adaptor.- Specified by:
updatein interfacexal.tools.data.DataListener- Parameters:
adaptor- The data adaptor corresponding to this object's data node.
-
write
public void write(xal.tools.data.DataAdaptor adaptor)
Instructs the receiver to write its data to the adaptor for external storage.- Specified by:
writein interfacexal.tools.data.DataListener- Parameters:
adaptor- The data adaptor corresponding to this object's data node.
-
getFolder
public File getFolder(int index)
get the folder at the specified index
-
watchFolders
public void watchFolders(File[] folders)
add new folders to the watch list
-
watchFolder
public void watchFolder(File folder)
add a new folder to the watch list
-
ignoreFolder
public void ignoreFolder(File folder)
remove a folder from the watch list
-
-