To create a Local Data Interface Module (DIM), you must define a class that implements jas.jds.module.LocalDIM
interface. To implement that interface,
public JASWizardPage getSetupPage()
This method should return a wizard page that will appear on the 'New Job Wizard' if
the user selects this DIM. Use it to prompt the user for whatever setup parameters
are relevant to your DIM. See the documentation on defining
wizard pages.public void setLocalJobBuilder(LocalJobBuilder ljb)
this.ljb = ljb;
setProgressModel()
which you can use to set the
progress model for the application window. You do not need to do this, but you may
wish to if you want to have the progress displayed as the data source is opened.
Pass as an argument an instance of BoundedRangeModel
.
Normally you would use DefaultBoundedRangeModel
.setMessage(String)
which you can use to show
messages on the application window.createJob(String)
where you will actually open
the job. The string argument can be anything you define it to be. It will be
the file name if you are reading a file, or an SQL command if reading from a data base,
etc. This string will simply be passed to the method openDataSet()
in
the LocalDIM, which is described in detail below.UserProperties prop = Application.getApplication().getUserProperties();
public EventSource openDataSet(String name) throws ModuleException
This method will be called after createJob()
is called in the
LocalJobBuilder. It must return an EventSource, which the application will use to
access the events in your data set. See the documentation on defining an EventSource.toString()
that your class inherits from java.lang.Object
and have it return a suitable description of your DIM. The Flat File DIM simply has:public String toString()
{
return "Flat file";
}
Whatever this method returns will be displayed as a choice in the local DIM
registry.java.io.Serializable
, so you must define
a serializable class. This means that all objects refered to by member variables of
your class will be serialized unless marked transient
. Be aware that
traisient variables are null when the object is read from disk, so be sure to initialize
them in a readObject() method.To use a local DIM, you must add your class to the Local DIM registry.
Page maintained by Jonas Gifford. Last updated 01/14/04.