public class PentahoSystemBoot extends Object
PentahoSystemBoot
is a
self-contained and very easy to configure platform initializer which does not impose the use of configuration
files on your filesystem. A booter instance gives you the flexibility to configure and run the platform entirely
in memory.
In general you will want to
PentahoSystemBoot
define(Class, Class)
variants
start()
@Before public void init() { PentahoSystemBoot booter = new PentahoSystemBoot(); // setup your required object definitions booter.define( IUnifiedRepository.class, DefaultUnifiedRepository.class ); // initialize the minimal platform booter.init(); }
Constructor and Description |
---|
PentahoSystemBoot()
Creates a minimal ready-to-run platform.
|
PentahoSystemBoot(String solutionPath)
Creates a minimal ready-to-run platform with a specified solution path.
|
PentahoSystemBoot(String solutionPath,
IPentahoDefinableObjectFactory factory) |
PentahoSystemBoot(String solutionPath,
String fullyQualifiedServerUrl) |
PentahoSystemBoot(String solutionPath,
String fullyQualifiedServerUrl,
IPentahoDefinableObjectFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
addAdminAction(IPentahoPublisher adminAction)
Adds an administrative action to the system.
|
void |
addLifecycleListener(IPentahoSystemListener lifecycleListener)
Adds a lifecycle listener.
|
void |
addStartupAction(ISessionStartupAction startupAction)
Adds a strtup action to the system.
|
protected void |
configure(String userFilePath,
String userFullyQualifiedServerUrl,
IPentahoDefinableObjectFactory userFactory)
Configures this booter to run.
|
protected IApplicationContext |
createApplicationContext()
Override this method if you want to change the type and state of the application context used to initialize
the system.
|
PentahoSystemBoot |
define(Class<?> interfaceClass,
Class<?> implClass)
Define a locally scoped object (aka prototype scope -- unique instance for each request for the class)
|
PentahoSystemBoot |
define(Class<?> interfaceClass,
Class<?> implClass,
IPentahoDefinableObjectFactory.Scope scope)
Define an arbitrarily scoped object
|
PentahoSystemBoot |
define(String key,
Class<?> implClass)
Define a locally scoped object (aka prototype scope -- unique instance for each request for the class)
|
PentahoSystemBoot |
define(String key,
Class<?> implClass,
IPentahoDefinableObjectFactory.Scope scope)
Define an arbitrarily scoped object
|
PentahoSystemBoot |
define(String key,
Object instance)
Hold an object instance by key name.
|
PentahoSystemBoot |
define(String key,
String implClassName,
IPentahoDefinableObjectFactory.Scope scope)
Define an arbitrarily scoped object
|
IPentahoObjectFactory |
getFactory()
Gets the object factory for the Pentaho platform
|
String |
getFilePath()
Sets the file path that will be used to get to file-based resources
|
List<IPentahoSystemListener> |
getLifecycleListeners()
Returns the list of lifecycle listeners that will be used.
|
ISystemSettings |
getSettingsProvider()
Gets the system settings object that will be used by the Pentaho platform
|
List<ISessionStartupAction> |
getStartupActions()
Returns the list of startup actions.
|
void |
init()
Deprecated.
use
start() . This method is hanging around for backward compatibility with MicroPlatform |
boolean |
isInitialized()
Returns true if the Pentaho platform has initialized successfully.
|
void |
setAdminActions(List<IPentahoPublisher> adminActions) |
void |
setFactory(IPentahoObjectFactory factory)
Sets the object factory for the Pentaho platform, This defaults to the StandaloneObjectFactory
|
void |
setFilePath(String filePath)
Sets the file path to be used to find configuration and content files If this is not set the current directory
(.) is used.
|
void |
setFullyQualifiedServerUrl(String fullyQualifiedServerUrl)
Sets the URL that the platform uses to generate paths to its own resources
|
void |
setLifecycleListeners(List<IPentahoSystemListener> lifecycleListeners)
Returns the list of lifecycle listeners that will be used.
|
void |
setSettingsProvider(ISystemSettings settingsProvider)
Sets the system settings object that will be used by the Pentaho platform
|
void |
setStartupActions(List<ISessionStartupAction> startupActions)
Sets the list of startup actions These actions will be executed on system startup or on session creation.
|
boolean |
start()
Starts the Pentaho platform, making it ready to process requests.
|
boolean |
stop()
Stops the Pentaho platform
|
public PentahoSystemBoot()
public PentahoSystemBoot(String solutionPath)
solutionPath
- full path to the pentaho_solutions folderpublic PentahoSystemBoot(String solutionPath, IPentahoDefinableObjectFactory factory)
public PentahoSystemBoot(String solutionPath, String fullyQualifiedServerUrl, IPentahoDefinableObjectFactory factory)
protected void configure(String userFilePath, String userFullyQualifiedServerUrl, IPentahoDefinableObjectFactory userFactory)
null
will be set with default values. The
default values are as follows:
public String getFilePath()
public void setFilePath(String filePath)
filePath
- public void setFullyQualifiedServerUrl(String fullyQualifiedServerUrl)
baseUrl
- protected IApplicationContext createApplicationContext()
public void init()
start()
. This method is hanging around for backward compatibility with MicroPlatformpublic boolean start() throws PlatformInitializationException
PlatformInitializationException
- if there was a problem initializing the platformpublic boolean stop()
public IPentahoObjectFactory getFactory()
public void setFactory(IPentahoObjectFactory factory)
public void addAdminAction(IPentahoPublisher adminAction)
adminAction
- public void setAdminActions(List<IPentahoPublisher> adminActions)
public void addLifecycleListener(IPentahoSystemListener lifecycleListener)
lifecycleListener
- public List<IPentahoSystemListener> getLifecycleListeners()
public void setLifecycleListeners(List<IPentahoSystemListener> lifecycleListeners)
public ISystemSettings getSettingsProvider()
public void setSettingsProvider(ISystemSettings settingsProvider)
public boolean isInitialized()
public List<ISessionStartupAction> getStartupActions()
public void setStartupActions(List<ISessionStartupAction> startupActions)
startupActions
- public void addStartupAction(ISessionStartupAction startupAction)
startupAction
- public PentahoSystemBoot define(String key, String implClassName, IPentahoDefinableObjectFactory.Scope scope)
key
- the key to retrieval of this objectimplClassName
- the actual type that is served back to you when requested.scope
- the scope of the objectPentahoSystemBoot
instance, for chainingNoSuchMethodError
- if the object factory does not support runtime object definitionpublic PentahoSystemBoot define(Class<?> interfaceClass, Class<?> implClass, IPentahoDefinableObjectFactory.Scope scope)
interfaceClass
- the key to retrieval of this objectimplClass
- the actual type that is served back to you when requested.scope
- the scope of the objectPentahoSystemBoot
instance, for chainingNoSuchMethodError
- if the object factory does not support runtime object definitionpublic PentahoSystemBoot define(String key, Class<?> implClass, IPentahoDefinableObjectFactory.Scope scope)
key
- the key to retrieval of this objectimplClass
- the actual type that is served back to you when requested.scope
- the scope of the objectPentahoSystemBoot
instance, for chainingNoSuchMethodError
- if the object factory does not support runtime object definitionpublic PentahoSystemBoot define(Class<?> interfaceClass, Class<?> implClass)
interfaceClass
- the key to retrieval of this objectimplClass
- the actual type that is served back to you when requested.public PentahoSystemBoot define(String key, Class<?> implClass)
key
- the key to retrieval of this objectimplClass
- the actual type that is served back to you when requested.public PentahoSystemBoot define(String key, Object instance)
key
- the key to retrieval of this objectinstance
- the actual instance that is served back to you when requested.Copyright © 2017 Hitachi Vantara. All rights reserved.