com.arsdigita.runtime
Class LegacyInitializer

java.lang.Object
  extended bycom.arsdigita.runtime.LegacyInitializer
All Implemented Interfaces:
Initializer

public class LegacyInitializer
extends Object
implements Initializer

The LegacyInitializer class provides an implementation of the Initializer interface that can be used to adapt a set of initializers written for the old Initializer system for use with the new Initializer system. This class works by using the deprecated Initializer.init(LegacyInitEvent) method. It is not possible to adapt old Initializers into the new Initialization system without using the legacy method because the new initialization system intentionally addresses only a subset of the requirements addressed by the old system. In particular the purpose of the new initialization system is to prepare the CCM runtime for interaction with the database. The old initialization system served not only to prepare the CCM runtime for interaction with the database, but also to do on demand data loading, read in configuration parameters, and perform context specific initialization such as spawing background threads. In order to facilitate easy packaging and configuration, these responsibilities have been divided into different areas in the latest version of CCM. For these reasons this class should only be used as an interim step towards adapting a CCM package to work with the new initialization and packaging APIs. Configuration parameters previously read in using the old Initializer classes should be made to use subclasses of AbstractConfig. On demand data loading should be moved into its own data loading script that is a subclass of AbstractScript. Data and domain initialization should be moved into a package specific implementation of the new Initializer interface.

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

Field Summary
static String versionId
          Deprecated.  
 
Constructor Summary
LegacyInitializer(String init)
          Deprecated. Invokes LegacyInitializer(String, ClassLoader) passing in the context class loader for the current thread as the fallback loader.
LegacyInitializer(String init, ClassLoader loader)
          Deprecated. Constructs a new legacy initializer that will locate the enterprise.init resource pointed to by init and invoke it using the old initialization system.
 
Method Summary
 void init(DataInitEvent evt)
          Deprecated. Implentation of Initializer.init(DataInitEvent evt) that does nothing.
 void init(DomainInitEvent evt)
          Deprecated. Implentation of Initializer.init(DomainInitEvent evt) that does nothing.
 void init(LegacyInitEvent evt)
          Deprecated. Implementation of Initializer.init(LegacyInitEvent evt) that locates the enterprise.init resource referenced in the constructor of this LegacyInitializer and invokes the old initialization code on the contents of the resource.
 
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
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

LegacyInitializer

public LegacyInitializer(String init,
                         ClassLoader loader)
Deprecated. 
Constructs a new legacy initializer that will locate the enterprise.init resource pointed to by init and invoke it using the old initialization system. The default configuration registry will be searched first, and if the resource is not found there, it will be searched for using loader

Parameters:
init - The name of a resource referring to a legacy enterprise.init file.
loader - The class loader to fallback on if the enterprise.init file is not found in the default configuration registry.

LegacyInitializer

public LegacyInitializer(String init)
Deprecated. 
Invokes LegacyInitializer(String, ClassLoader) passing in the context class loader for the current thread as the fallback loader.

Parameters:
init - The name of a resource referring to a legacy enterprise.init file.
See Also:
Thread.getContextClassLoader()
Method Detail

init

public void init(DataInitEvent evt)
Deprecated. 
Implentation of Initializer.init(DataInitEvent evt) that does nothing.

Specified by:
init in interface Initializer
Parameters:
evt - A context object with accessors for data initialization

init

public void init(DomainInitEvent evt)
Deprecated. 
Implentation of Initializer.init(DomainInitEvent evt) that does nothing.

Specified by:
init in interface Initializer
Parameters:
evt - A context object with accessors for domain initialization
See Also:
DomainObjectInstantiator, DomainObjectFactory, GlobalObserver, GlobalObserverManager

init

public void init(LegacyInitEvent evt)
Deprecated. 
Implementation of Initializer.init(LegacyInitEvent evt) that locates the enterprise.init resource referenced in the constructor of this LegacyInitializer and invokes the old initialization code on the contents of the resource.

Specified by:
init in interface Initializer


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