|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface every Analyzer
class has to implement.
It is more likely you'll want to extend the AbstractAnalyzer
class instead.
Method Summary | |
void |
addAnalysisListener(AnalysisListener al)
The Analyzer object needs to keep a list of AnalysisListeners and
notify them of analysis start, progress, finish and errors. |
void |
analyze()
The method called by the application to start the analysis process. |
String |
getCopyright()
If this method returns anything, it will be included in the application's user interface for this Analyzer 's settings. |
String |
getDescription()
The application will read a description for this Analyzer object which will be used
in the analyzer selection list. |
Component |
getSettingsUI()
Called when the implementing class is selected by the user. |
boolean |
isRunning()
Returns true if the analysis is currently running. |
boolean |
isWaitingForUI()
Returns true if the analysis is currently suspended,
waiting for some user interface action to complete. |
void |
postProcess()
Called immediately after the analyze method. |
void |
preProcess()
Called immediately before the analyze method. |
void |
removeAnalysisListener(AnalysisListener al)
The Analyzer object needs to keep a list of AnalysisListeners and
notify them of analysis start, progress, finish and errors. |
void |
setDescription(String desc)
The application may set an alternate description for this Analyzer object which will be
used in the analyzer selection list. |
void |
setSources(File snapshotFile,
File globalDBFile,
File outFile)
Accepts (and probably stores) the two input files and the output file used by the analysis. |
void |
setWaitingForUI(boolean waitForUI)
This method will be called after an AnalysisEvent.TYPE_REQUEST_UI_DISPLAY
request by this Analyzer object has completed. |
void |
stopAnalysis(String info)
Called when the application wants to interrupt the analysis. |
Methods inherited from interface java.lang.Runnable |
run |
Method Detail |
public void setSources(File snapshotFile, File globalDBFile, File outFile)
snapshotFile
- The WebCT IMS Enterprise snapshot export file.globalDBFile
- The WebCT Global Database CVS export file.outFile
- The output file.public void analyze()
Runnable
after all.)
public void preProcess() throws AnalysisException
analyze
method.
Any last-minute prep work that didn't fit in the settings user interface produced by
getSettingsUI
should be done here.
AnalysisException
- Most checked exceptions that may occur in this method should be wrapped
inside an AnalysisException
for proper notification to the user.public void postProcess() throws AnalysisException
analyze
method.
Any cleanup work that couldn't be done in the analysis itself should be done here.
AnalysisException
- Most checked exceptions that may occur in this method should be wrapped
inside an AnalysisException
for proper notification to the user.public Component getSettingsUI()
javax.swing.JPanel
or something,
that gives the user the opprtunity to set options on the Analyzer
object before the analysis starts.
public boolean isRunning()
true
if the analysis is currently running.
public boolean isWaitingForUI()
true
if the analysis is currently suspended,
waiting for some user interface action to complete.
public void setWaitingForUI(boolean waitForUI)
AnalysisEvent.TYPE_REQUEST_UI_DISPLAY
request by this Analyzer
object has completed.
waitForUI
- Whether or not to wait for the user interface to complete.public void stopAnalysis(String info)
info
- Some information as to why the analysis was stopped. You can pass this on to the user by using the
AnalysisEvent.setInfo
method and then firing the event
with type AnalysisEvent.TYPE_FINISHED
.public void addAnalysisListener(AnalysisListener al)
Analyzer
object needs to keep a list of AnalysisListeners
and
notify them of analysis start, progress, finish and errors.
al
- The listener to add to the list.public void removeAnalysisListener(AnalysisListener al)
Analyzer
object needs to keep a list of AnalysisListeners
and
notify them of analysis start, progress, finish and errors.
al
- The listener to remove to the list.public void setDescription(String desc)
Analyzer
object which will be
used in the analyzer selection list.
desc
- The description of this Analyzer
.public String getDescription()
Analyzer
object which will be used
in the analyzer selection list. For proper application integration, your implementation should also
override toString
to return getDescription()
.
Analyzer
.public String getCopyright()
Analyzer
's settings.
Analyzer
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |