0 Replies Latest reply on Jul 26, 2010 12:42 PM by objectiser Branched from an earlier discussion.

    Validation mechanism updated

    objectiser

      Validation mechanism has now been updated.

       

      The org.scribble.protocol.validation.ProtocolValidationManager is the overall manager component, responsible for performing the validation task on a protocol model. It has a number of ProtocolValidator implementations registered with it that perform the actual validation.

       

      The reason for doing it this way is to enable extensibility - further validation can easily be added by simply registering a new ProtocolValidator implementation (whether directly or via the OSGi approach), rather than having to change the code of an existing validator.

       

      To support validation of the model components, a ProtocolComponentValidator implementation has been created upon which ProtocolComponentValidatorRule implementations can be registered.

       

      The rule interface has an 'isSupported' method to determine whether a particular ModelObject (the root class of all protocol model classes) can be processed by the rule. If so, then the validation mechanism will invoke the 'validate' method on the rule.