org.iges.grads.server
Class GradsUpdateModule
java.lang.Object
|
+--org.iges.anagram.AbstractModule
|
+--org.iges.grads.server.GradsUpdateModule
- All Implemented Interfaces:
- Module
- public class GradsUpdateModule
- extends AbstractModule
Updates a data handle to be in synch with the actual data
source. This provides a quick way for the Catalog to check for
changes to the back-end data store.
|
Method Summary |
void |
configure(Setting setting)
Configures the module according to the settings provided. |
boolean |
doUpdate(DataHandle data)
Checks if the DataHandle provided is out of date and updates
it if necessary. |
protected boolean |
fileModified(java.io.File file,
long createTime)
|
java.lang.String |
getModuleID()
Returns an ID for this module. |
protected void |
reload(DataHandle data)
Brings internal structures in a DataHandle up-to-date with
respect to the data files. |
| Methods inherited from class org.iges.anagram.AbstractModule |
configModule, debug, debug, error, fail, fail, fail, getModuleName, info, init, toString, verbose, verbose |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
tool
protected GradsTool tool
GradsUpdateModule
public GradsUpdateModule(GradsTool tool)
getModuleID
public java.lang.String getModuleID()
- Description copied from interface:
Module
- Returns an ID for this module. This ID should be a legal XML
tag name. It has two uses: as a tag name in the server's
configuration file, and as the final element of the complete module
name.
- Specified by:
getModuleID in interface Module- Specified by:
getModuleID in class AbstractModule
configure
public void configure(Setting setting)
throws ConfigException
- Description copied from class:
AbstractModule
- Configures the module according to the settings provided. The
server supports dynamic reconfiguration. Thus this method may be
called at any time in the life of the module. If the module
cannot be reconfigured, it should throw an exception.
- Specified by:
configure in interface Module- Specified by:
configure in class AbstractModule
ConfigException
doUpdate
public boolean doUpdate(DataHandle data)
throws ModuleException
- Checks if the DataHandle provided is out of date and updates
it if necessary. A DataHandle is considered out of date iff the
descriptor file, source file, or supplemental DAS file have
been modified or deleted since the DataHandle was created.
- Returns:
- null if the Datahandle has not changed, or else, the
new, updated DataHandle object
- Throws:
ModuleException - if the data can no longer be accessed.
fileModified
protected boolean fileModified(java.io.File file,
long createTime)
reload
protected void reload(DataHandle data)
throws ModuleException
- Brings internal structures in a DataHandle up-to-date with
respect to the data files. There is redundancy here with
respect to the code in GradsImportModule, which indicates that
the design could definitely be improved.
ModuleException