javax.jifi.verification
Interface Verifiable

All Known Implementing Classes:
DefaultIterator, DialogBoxBean, DoWhileIterator, EditFileAction, ExampleAction, ExampleDialog, ExamplePage, ExampleRule, ExampleUnit1, FileEdit, FindInFileRule, FolderBean, FontParameters, InputField, InstallableBean, LauncherBootstrap, OptionList, OptionRule, PageBean, PortDefinition, ProductDefinition, QueryDialogBean, RegistryValue, RuleAdaptor, RuleSetAdaptor, SimpleAction, UIGroupSettingsBean, WhileIterator

public interface Verifiable

This interface is implemented by all classes that should be verified by the builder prior to generating an archive. A Verifiable object must provide a verification ID, which is a user-readable string used to identify the object being verified, and a verify() method. The verify() method checks the objects members to see if any data is missing or conflicting, and generates UserMessage objects giving diagnostic messages for display by the builder. If a fatal error is encountered, the verify() method should throw a VerificationException.

This interface is part of the public JifiBuilderAPI.

Version:
$Revision: 1.7 $ $Date: 2002/12/05 17:49:27 $
Author:
Marti DeMore
See Also:
& @see VerificationException

Method Summary
 java.lang.String getVerificationID()
          Returns a human-readable ID for this object, which is used to identify the source of verification messages for the user.
 UserMessage[] verify()
          Verifies the object prior to archive generation.
 

Method Detail

verify

public UserMessage[] verify()
                     throws VerificationException
Verifies the object prior to archive generation. Any warning or error messages are returned as an array of UserMessage objects. If no messages are generated, this method may return a UserMessage array of length 0, or null. If a fatal condition is encountered, meaning the object discovers a condition which should stop generation of the archive, a VerificationException must be thrown. If the object has verifiable children, it is advisable to catch this exception in the verify() method and add to the exception any UserMessages already collected before re-throwing it. This allows the user to receive the maximum amount of information via UserMessages along with the exception.
Returns:
an array of UserMessages
Throws:
VerificationException - if an error serious enough to stop archive generation is encountered

getVerificationID

public java.lang.String getVerificationID()
Returns a human-readable ID for this object, which is used to identify the source of verification messages for the user.
Returns:
String an ID string