com.waveset.session
Interface BulkMonitor

All Known Implementing Classes:
WavesetConsole.ConsoleBulkMonitor

public interface BulkMonitor

A interface that may be supplied as an argument to the Session.importObjects and Session.exportObjects methods to allow an application to receive notifications as the import or export is in progress.

This is essentially a "callback" hook. Java purists would probably use events and listeners, but there can only be one listener per call, this seems simpler.

Rather than have a seperate import/export/archive/restore monitor classes, we overload the processObject method with an "operation" code, since they're all fairly similar.

This is pretty crude right now, its here mostly for the waveset console, but I didn't want to just add a boolean "verbose" flag since we're likely going to want to drive this from a GUI at some point.


Field Summary
static java.lang.String code_id
          This is only public so that it can be contained in an interface.
 
Method Summary
 void error(java.lang.String msg)
          Called for error message that happen during the load.
 java.lang.String getSource()
          Called to get the source of bulk operation, used primarily for auditing should include something like a filename when a file is being imported/exported.
 void processObject(PersistentObject obj, java.lang.String operation)
          Called for each object that is processed.
 void processType(Type t)
          Called as we begin processing a type.
 void setSource(java.lang.String source)
           
 void warning(java.lang.String msg)
          Called for warning message that happen during the load.
 

Field Detail

code_id

public static final java.lang.String code_id
This is only public so that it can be contained in an interface.

See Also:
Constant Field Values
Method Detail

processType

public void processType(Type t)
Called as we begin processing a type.


processObject

public void processObject(PersistentObject obj,
                          java.lang.String operation)
Called for each object that is processed. The operation is a string describing what is being done to the object, it may be null if the operation is obvious from context. Examples include "Added", "Updated", "Restored".


warning

public void warning(java.lang.String msg)
Called for warning message that happen during the load.


error

public void error(java.lang.String msg)
Called for error message that happen during the load.


getSource

public java.lang.String getSource()
Called to get the source of bulk operation, used primarily for auditing should include something like a filename when a file is being imported/exported. The audit record will include the source as the objectName.


setSource

public void setSource(java.lang.String source)