org.apache.avalon.merlin.impl
Class DefaultFactory

java.lang.Object
  extended byorg.apache.avalon.merlin.impl.DefaultFactory
All Implemented Interfaces:
Factory

public class DefaultFactory
extends Object
implements Factory

The DefaultFactory provides support for the establishment of a new merlin kernel.


Constructor Summary
DefaultFactory(InitialContext context, ClassLoader classloader)
          Creation of a new default factory.
 
Method Summary
 Object create()
          Creation of a new kernel using the default criteria.
 Object create(Map map)
          Creation of a new kernel using the supplied criteria.
 Map createDefaultCriteria()
          Return of map containing the default parameters.
 void printComponentModel(StringBuffer buffer, String lead, ComponentModel model)
           
 void printContainmentModel(StringBuffer buffer, String lead, ContainmentModel model)
           
 void printDeploymentModel(StringBuffer buffer, String lead, DeploymentModel model)
           
 void printModel(DeploymentModel model)
           
 void printModel(StringBuffer buffer, String lead, DeploymentModel model)
           
 void setupLanguageCode(KernelCriteria criteria)
          If the kernel criteria includes a language code then set the current local to the declared value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFactory

public DefaultFactory(InitialContext context,
                      ClassLoader classloader)
Creation of a new default factory.

Parameters:
context - the repository inital context
classloader - the factory classloader
Method Detail

createDefaultCriteria

public Map createDefaultCriteria()
Return of map containing the default parameters.

Specified by:
createDefaultCriteria in interface Factory
Returns:
the default parameters

create

public Object create()
              throws Exception
Creation of a new kernel using the default criteria.

Specified by:
create in interface Factory
Returns:
the kernel instance
Throws:
Exception - if an error occurs during root block establishment

create

public Object create(Map map)
              throws Exception
Creation of a new kernel using the supplied criteria.

Specified by:
create in interface Factory
Parameters:
map - the parameters
Returns:
the kernel instance
Throws:
Exception - if an error occurs during kernel creation

setupLanguageCode

public void setupLanguageCode(KernelCriteria criteria)
If the kernel criteria includes a language code then set the current local to the declared value.

Parameters:
criteria - the kernel criteria

printModel

public void printModel(DeploymentModel model)

printModel

public void printModel(StringBuffer buffer,
                       String lead,
                       DeploymentModel model)

printContainmentModel

public void printContainmentModel(StringBuffer buffer,
                                  String lead,
                                  ContainmentModel model)

printComponentModel

public void printComponentModel(StringBuffer buffer,
                                String lead,
                                ComponentModel model)

printDeploymentModel

public void printDeploymentModel(StringBuffer buffer,
                                 String lead,
                                 DeploymentModel model)


Copyright © The Apache Software Foundation. All Rights Reserved.