com.sri.emo.wizard
Interface WizardRepository

All Known Implementing Classes:
DefaultWizardRepository, ExpressoAwareWizardRepository

public interface WizardRepository

Location where all instances of Wizards may be retrieved.

Author:
Michael Rimov

Method Summary
 void addFactory(Serializable id, WizardFactory factory)
          Adds a factory to the repository.
 Wizard find(Serializable id)
          Retrieve a wizard based on id.
 List list()
          Retrieve instances of all wizards stored in the repository.
 void removeWizard(Serializable id)
          Removes a particular wizard from the repository.
 

Method Detail

find

Wizard find(Serializable id)
            throws WizardException
Retrieve a wizard based on id.

Parameters:
id - the identification field.
Returns:
Wizard instance.
Throws:
WizardException - upon repository query or wizard construction error.

list

List list()
          throws WizardException
Retrieve instances of all wizards stored in the repository.

Returns:
java.util.List
Throws:
WizardException - upon listing or construction error.

addFactory

void addFactory(Serializable id,
                WizardFactory factory)
Adds a factory to the repository. The interface will

Parameters:
id - the unique id of the wizard that we're going to hold.
factory - the factory to use for building new instances of Wizards
Throws:
IllegalArgumentException - if the id already exists.

removeWizard

void removeWizard(Serializable id)
Removes a particular wizard from the repository. Often more used for unit testing.

Parameters:
id - the id of the wizard.


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.