Package ca.macewan.lmsreporter.api

The LMS Reporter API package provides a simple API for creating your own analysis classes to be hosted by the LMS Reporter application.

See:
          Description

Interface Summary
AnalysisListener Classes that want to be notified by an Analyzer object of the status of the analysis should implement this interface.
Analyzer This is the interface every Analyzer class has to implement.
 

Class Summary
AbstractAnalyzer Convenience class that implements the Analyzer interface.
AnalysisEvent The event type sent by Analyzer objects to AnalysisListener objects.
 

Exception Summary
AnalysisException The class to report analysis-specific errors.
 

Package ca.macewan.lmsreporter.api Description

The LMS Reporter API package provides a simple API for creating your own analysis classes to be hosted by the LMS Reporter application.

There are two ways to create a new analyzer:

Since there are quite a few methods in the Analyzer interface, you'll usually want to extend the AbstractAnalyzer class instead. The abstract class implements all interface methods exccept for the run method, which is where your analysis code should go. A minimal implementation (which just counts up to 25) might look something like this:
import ca.macewan.lmsreporter.api.*;

public class DummyAnalyzer extends AbstractAnalyzer {
  public DummyAnalyzer() {
    // This description will be used to display the analysis
    // in the application's analysis selection list.
    setDescription("Dummy Analyzer");
  }
  
  public void run() {
    int i;
    
    for (i = 0; i < 25; i++) {
      updateProgress(i / 25.0);
      // The sleep is just to make sure the UI has time to update.
      // This is not necessary for a real implementation.
      try {
        Thread.currentThread().sleep(400);
      } catch (InterruptedException ie) {
      }
    }
  
    // Let the application know the analysis is done.
    finishAnalysis("Nothing was done, really");
  }
}

For more information, check the documentation of the AbstractAnalyzer class.

Deployment

To make your analysis classes available to the LMS Reporter application, simply package the class and any support classes it may use in a JAR file and drop it in the directory called "analyzers". LMS Reporter uses a simple plug-in model for finding analysis classes. To be recognized by the application, your analyzer should meet the following requirements:

Version:
0.1
Author:
Erwin Veugelers