com.mindtree.techworks.insight.reporting.verifiers
Interface VerifierDeserializer

All Known Implementing Classes:
VerifierDeserializerImpl

public interface VerifierDeserializer

Implementations of this class would deserialize a serialized Verifier.

While using a Verifier, Insight would call the #getDeserializer method to get the instance of the VerifierDeserializer to use for (re)creating the Verifier instance.

The Insight distribution provides a default implementation for the the Interface as VerifierDeserializerImpl. To use the services of the default implementation, Verifiers need to implement the DefaultImplDeserializable interface. The default implementation uses this interface to populate the values of the fields in the Verifier. Such Verifiers need to return an instance of the VerifierDeserializerImpl when the #getDeserializer() is called on them. They also need to be serialized in the exact format specified below, or deserialization might fail.

Serialized Verifier

The suggested format to serialize a Verifier is as below:

        <verifier>
                <!-- The class that implements the Verifier interface -->
                <class>the.implementing.class.of.the.verifier</class>
                <!-- The display name of the verifier -->
                <name>Verifier Display Name</name>
                <fields>
                        <field>
                                <name>nonArrayField</name>
                                <isArray>false</isArray>
                                <value>Some Value</value>
                        </field>
                        <field>
                                <name>arrayField</name>
                                <isArray>true</isArray>
                                <value>Some Value</value>
                                <value>Some Other Value</value>
                        </field>
                </fields>
                <jobs>
                        <job>
                                <!-- A serialized job used by the Verifier (including the
                                                'job' tag above). For more details on the format here
                                                refer to the documentation of Jobs. -->
                        </job>
                </jobs>
        </verifier>
 
If the Verifier provides its own Serializer and VerifierDeserializer, then it need not follow the format mentioned here except for the following tags:
  1. The outer <verifier/> tag.
  2. The first level <class/> tag, required to get the Verifier class and get its VerifierDeserializer.

Since:
Insight 1.5
Version:
$Revision: 27 $ $Date: 2007-12-16 04:58:03 -0700 (Sun, 16 Dec 2007) $
Author:
Bindul Bhowmik
See Also:
VerifierDeserializerImpl, DefaultImplDeserializable, Verifier

Method Summary
 Verifier deserializeVerifier(java.lang.String serializedVerifier)
          Deserializes a serialized Verifier.
 

Method Detail

deserializeVerifier

Verifier deserializeVerifier(java.lang.String serializedVerifier)
                             throws VerifierInitializationException
Deserializes a serialized Verifier. The specific format of the serialized Verifier or the way to deserialize a particular Verifier would depend on the implementation of the Verifier and its (de)serializer.

Parameters:
serializedVerifier - The serialized format of the Verifier.
Returns:
On successful deserialization, the Verifier instance.
Throws:
VerifierInitializationException - If the Verifier cannot be deserialized.


Copyright © 2003-2008 MindTree Consulting Ltd.. All Rights Reserved.