org.pentaho.platform.api.engine
Interface IPentahoDefinableObjectFactory

All Superinterfaces:
IPentahoObjectFactory
All Known Implementing Classes:
StandaloneObjectFactory

public interface IPentahoDefinableObjectFactory
extends IPentahoObjectFactory

This class subclasses IPentahoObjectFactory and adds methods that enables the implementation to allow objects to be defined through public classes. The main use case for this is a system where the objects created by the factory are defined in code via an API. Examples are when the Pentaho system is fully embedded into an application, and unit tests.

Author:
jamesdixon

Nested Class Summary
static class IPentahoDefinableObjectFactory.Scope
          The different object scopes that are supported
 
Method Summary
 void defineObject(String key, String className, IPentahoDefinableObjectFactory.Scope scope)
          Defines a new object.
 void defineObject(String key, String className, IPentahoDefinableObjectFactory.Scope scope, ClassLoader loader)
          Defines a new object that must be loaded with a specific classloader
 
Methods inherited from interface org.pentaho.platform.api.engine.IPentahoObjectFactory
get, get, getImplementingClass, init, objectDefined
 

Method Detail

defineObject

void defineObject(String key,
                  String className,
                  IPentahoDefinableObjectFactory.Scope scope)
Defines a new object.

Parameters:
key - - typically the interface name
className - - the name of the class to instatiate
scope - - the scope of the object

defineObject

void defineObject(String key,
                  String className,
                  IPentahoDefinableObjectFactory.Scope scope,
                  ClassLoader loader)
Defines a new object that must be loaded with a specific classloader

Parameters:
key - - typically the interface name
className - - the name of the class to instatiate
scope - - the scope of the object
loader - - the loader to be used to create the class