#10 [reporting] Store and load Verifiers and Jobs

open
nobody
Insight UI (18)
5
2008-01-18
2008-01-18
Bindul Bhowmik
No

Team,

This tracker is mostly to track the feature required in the run up to the daemon where we will be requiring stored verifiers (and jobs associated with them). Users need to be able to configure 'named' Verifiers with Jobs and the daemon can pick that up.

The problem currently lies in the fact that we need generic GUI screens which can work with multiple forms of Verifiers and Jobs with varying fields.

PROPOSED SOLUTION

1. Configuring Named Verifiers:
------------------------------
Verifiers will be stored in the Preferences of Insight in the preference sample shown below:
<preference isUserModifiable="true" isAggregated="false" name="Stored Verifiers"
id="storedVerifiers" displayClass="com.mindtree.insight.gui.preferences.StoredVerifiersUIPanel">
<preferenceAttribute name="My First Sample Verifier" id="storedVerifier01">
<value><!-- Serialized Verifier with job goes here--></value>
<type>TEXT</type>
<persistant>true</persistant>
<userModifiable>true</userModifiable>
</preferenceAttribute>
</preference>

Each Verifier will be stored in a PreferenceAttribute. The UI display will be as part of the current Preferences UI. The main panel (StoredVerifiersUIPanel) will show the current configured Verifiers (in a listbox?) with options to edit, delete or create new Verifiers. Edit and create actions would bring up new dialog described below.

1.1 Configuring Verifiers:
-------------------------
We will have a new dialog which will work on a single Verifier. It will have a list of all the Jobs associated with the Verifier and provide a dialog (described below) to modify / delete / add jobs.

The dialog will discover the fields in the Verifier (using the serialized form of the Verifier) and provide key value kind of text value entry fields to configure the Verifier. For now only text values will be supported.

When creating a new Verifier, the dialog will first ask the user to select the type of the Verifier from the available verifiers in the Verifier Registry (see Section 2 below).

The Verifier design will be enhanced to let the Verifier instance return the UI panel used for its configuration. The implementation mentioned above will be the default return value from AbstractVerifier.

1.2 Configuring Jobs:
--------------------
Job configuration will also be handled similar to that of Verifiers, but only one implementation will be allowed for the dialog (analogous to serialization of Jobs).

2. Known Verifiers:
------------------
I suggest we have an implementation of a Registry (call it VerifierAndJobRegistry or something else) which will keep track of all known Verifiers and Jobs in Insight. We will not be using any discovery mechanisms here right now and this will be backed by a Preference (template below) and loaded on first call to the class.

<preference isUserModifiable="false" isAggregated="false" name="Available Verifiers and
Jobs" id="avblVerifiersJobs">
<preference isUserModifiable="false" isAggregated="false" name="Available Verifiers"
id="avblVerifiers">
<preferenceAttribute name="Count Verifier" id="countVerifier">
<value>com.mindtree.insight.reporting.verifiers.impl.CountVerifier</value>
<type>TEXT</type>
<persistant>true</persistant>
<userModifiable>false</userModifiable>
</preferenceAttribute>
</preference>
<preference isUserModifiable="false" isAggregated="false" name="Available Jobs"
id="avblJobs">
<preferenceAttribute name="Email Job" id="emailJob">
<value>com.mindtree.insight.reporting.jobs.impl.EmailJob</value>
<type>TEXT</type>
<persistant>true</persistant>
<userModifiable>false</userModifiable>
</preferenceAttribute>
</preference>
</preference>

Any new Verifiers released by us can be directly added to the preference file. However, it would also be possible for programs to add verifiers to the registry using methods defined in the Registry class.

I will be working on the UI mock-ups.

PLEASE PROVIDE YOUR COMMENTS / SUGGESTIONS / REMARKS ON THE IMPLEMENTATION ABOVE. You may please upload your comments here or send them to the dev mailing list.

\_ Bindul

Discussion