com.arsdigita.runtime
Class CompoundInitializer

java.lang.Object
  extended bycom.arsdigita.runtime.CompoundInitializer
All Implemented Interfaces:
Initializer
Direct Known Subclasses:
Initializer, Startup

public class CompoundInitializer
extends Object
implements Initializer

The CompoundInitializer class provides a convenient way to group together a number of individual initializers into a single object that implements the Initializer interface. Using this class to group initializers will guarantee that the various init methods on the contained initializers will be invoked in the proper order, i.e. all data init methods will be invoked first in order, followed by all domain init methods, followed by all legacy init methods.

Version:
$Revision: #5 $ $Date: 2004/04/07 $
Author:
Rafael H. Schloming <rhs@mit.edu>

Field Summary
static String versionId
           
 
Constructor Summary
CompoundInitializer()
          Creates a new and empty compound initializer.
CompoundInitializer(org.apache.log4j.Logger log)
          Creates a new and empty compound initializer that uses the log Logger to log progress through initialization.
 
Method Summary
 void add(Initializer init)
          Adds init to the set of initializers to be initialized by this CompoundInitializer.
 void init(DataInitEvent evt)
          Implementation of the Initializer.init(DataInitEvent) method.
 void init(DomainInitEvent evt)
          Implementation of the Initializer.init(DomainInitEvent) method.
 void init(LegacyInitEvent evt)
          Implementation of the Initializer.init(LegacyInitEvent) method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

CompoundInitializer

public CompoundInitializer()
Creates a new and empty compound initializer.


CompoundInitializer

public CompoundInitializer(org.apache.log4j.Logger log)
Creates a new and empty compound initializer that uses the log Logger to log progress through initialization.

Parameters:
log - A logger to be used for logging progress through initialization.
Method Detail

add

public void add(Initializer init)
Adds init to the set of initializers to be initialized by this CompoundInitializer. The most recently added initializers will be invoked last.

Parameters:
init - The initializer to add to this CompoundInitializer

init

public void init(DataInitEvent evt)
Implementation of the Initializer.init(DataInitEvent) method. This implementation proceeds through the list of sub initializers in order and invokes the init(DataInitEvent) method of each sub initializer in turn.

Specified by:
init in interface Initializer
Parameters:
evt - The data init event.

init

public void init(DomainInitEvent evt)
Implementation of the Initializer.init(DomainInitEvent) method. This implementation proceeds through the list of sub initializers in order and invokes the init(DomainInitEvent) method of each sub initializer in turn.

Specified by:
init in interface Initializer
Parameters:
evt - The domain init event.
See Also:
DomainObjectInstantiator, DomainObjectFactory, GlobalObserver, GlobalObserverManager

init

public void init(LegacyInitEvent evt)
Implementation of the Initializer.init(LegacyInitEvent) method. This implementation proceeds through the list of sub initializers in order and invokes the init(LegacyInitEvent) method of each sub initializer in turn.

Specified by:
init in interface Initializer
Parameters:
evt - The legacy init event.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC