Changes between Version 2 and Version 3 of ValidationHook


Ignore:
Timestamp:
Aug 2, 2012, 1:12:53 PM (12 years ago)
Author:
heikki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ValidationHook

    v2 v3  
    3838== Proposal ==
    3939
    40 Currently, a standard post-validation is invoked from 2 places in !DataManager, 'saveValidationStatus' which saves a summary of the validation result to the database. This proposal would replace these calls with a call to a new method 'postValidation' which first does the same as does 'saveValidationStatus' now, and then invokes the pluggable Validation hook, if any is configured.
     40Currently, a standard post-validation is invoked from 2 places in !DataManager, 'saveValidationStatus()' which saves a summary of the validation result to the database. This proposal would replace these calls with a call to a new method 'postValidation' which first does the same as does 'saveValidationStatus()' now, and then invokes the pluggable Validation hook, if any is configured.
    4141
    42 It does this in a manner similar to the !StatusActions hook: a Factory class takes the class name of the hook implementation from config.xml. If none is configured, nothing happens and the program behaves exactly as without this proposal. If one is configured, reflection is used to instantiate the class, execute an 'init()' method, and execute an 'onValidate' method.
     42It does this in a manner similar to the !StatusActions hook: a Factory class takes the class name of the hook implementation from config.xml. If none is configured, nothing happens and the program behaves exactly as without this proposal. If one is configured, reflection is used to instantiate the class, execute an 'init()' method, and execute an 'onValidate()' method.
    4343
    4444User-provided implementations of the Validation hook must conform to the contract of this interface: