org.apache.jetspeed.engine
Class JetspeedEngine

java.lang.Object
  extended by org.apache.jetspeed.engine.JetspeedEngine
All Implemented Interfaces:
org.apache.jetspeed.engine.Engine, org.apache.jetspeed.engine.JetspeedEngineConstants, org.apache.pluto.services.ContainerService, org.apache.pluto.services.factory.FactoryManagerService, org.apache.pluto.services.PortletContainerEnvironment

public class JetspeedEngine
extends Object
implements org.apache.jetspeed.engine.Engine

AbstractEngine

Version:
$Id: AbstractEngine.java 188433 2005-03-23 22:50:44Z ate $
Author:
David Sean Taylor , Scott T. Weaver

Field Summary
private  org.apache.jetspeed.components.ComponentManager componentManager
           
private  javax.servlet.ServletConfig config
           
private  org.apache.jetspeed.PortalContext context
           
protected  String defaultPipelineName
           
protected static org.apache.commons.logging.Log log
           
private  Map pipelineMapper
           
private  org.apache.jetspeed.statistics.PortalStatistics statistics
           
 
Fields inherited from interface org.apache.jetspeed.engine.JetspeedEngineConstants
APPLICATION_ROOT_DEFAULT, APPLICATION_ROOT_KEY, CONFIG_NAMESPACE, CONSOLE_LOGGER, DEFAULT_LOGGER, JETSPEED_PROPERTIES_DEFAULT, JETSPEED_PROPERTIES_KEY, LOG4J_CONFIG_FILE, LOG4J_CONFIG_FILE_DEFAULT, LOGGING_ROOT, LOGGING_ROOT_DEFAULT, MAIL_SERVER_KEY, PIPELINE_CLASS, PIPELINE_DEFAULT, PIPELINE_DIRECTORY, PREFERENCES_FACTORY, PREFERENCES_FACTORY_DEFAULT, SCHEDULER_LOG_FACILITY, WEB_CONTEXT, WEBAPP_ROOT_KEY
 
Constructor Summary
JetspeedEngine(org.apache.commons.configuration.Configuration configuration, String applicationRoot, javax.servlet.ServletConfig config, org.apache.jetspeed.components.ComponentManager componentManager)
           
JetspeedEngine(org.apache.jetspeed.administration.PortalConfiguration configuration, String applicationRoot, javax.servlet.ServletConfig config, org.apache.jetspeed.components.ComponentManager componentManager)
           
 
Method Summary
 org.apache.jetspeed.components.ComponentManager getComponentManager()
           
 org.apache.pluto.services.ContainerService getContainerService(Class service)
           getContainerService
 org.apache.jetspeed.PortalContext getContext()
          Returns the context associated with this engine.
 org.apache.jetspeed.request.RequestContext getCurrentRequestContext()
           
 org.apache.pluto.factory.Factory getFactory(Class theClass)
           getFactory
 org.apache.jetspeed.pipeline.Pipeline getPipeline()
           
 org.apache.jetspeed.pipeline.Pipeline getPipeline(String pipelineName)
           
 String getRealPath(String path)
          Given a application relative path, returns the real path relative to the application root
 javax.servlet.ServletConfig getServletConfig()
          Get the servlet configuration if this engine is running under a servlet container.
 void service(org.apache.jetspeed.request.RequestContext context)
           
 void shutdown()
           
 void start()
          Initializes the engine with a commons configuration, starting all early initable services.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

private final org.apache.jetspeed.PortalContext context

config

private final javax.servlet.ServletConfig config

componentManager

private final org.apache.jetspeed.components.ComponentManager componentManager

pipelineMapper

private Map pipelineMapper

statistics

private org.apache.jetspeed.statistics.PortalStatistics statistics

log

protected static final org.apache.commons.logging.Log log

defaultPipelineName

protected String defaultPipelineName
Constructor Detail

JetspeedEngine

public JetspeedEngine(org.apache.commons.configuration.Configuration configuration,
                      String applicationRoot,
                      javax.servlet.ServletConfig config,
                      org.apache.jetspeed.components.ComponentManager componentManager)

JetspeedEngine

public JetspeedEngine(org.apache.jetspeed.administration.PortalConfiguration configuration,
                      String applicationRoot,
                      javax.servlet.ServletConfig config,
                      org.apache.jetspeed.components.ComponentManager componentManager)
Method Detail

start

public void start()
           throws org.apache.jetspeed.exception.JetspeedException
Initializes the engine with a commons configuration, starting all early initable services.

Specified by:
start in interface org.apache.jetspeed.engine.Engine
Parameters:
configuration - a commons Configuration set
applicationRoot - a String path to the application root for resources
-
Throws:
org.apache.jetspeed.exception.JetspeedException - when the engine fails to initilialize

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Get the servlet configuration if this engine is running under a servlet container.

Specified by:
getServletConfig in interface org.apache.jetspeed.engine.Engine
Returns:
config The servlet configuration

shutdown

public void shutdown()
              throws org.apache.jetspeed.exception.JetspeedException
Specified by:
shutdown in interface org.apache.jetspeed.engine.Engine
Throws:
org.apache.jetspeed.exception.JetspeedException

service

public void service(org.apache.jetspeed.request.RequestContext context)
             throws org.apache.jetspeed.exception.JetspeedException
Specified by:
service in interface org.apache.jetspeed.engine.Engine
Throws:
org.apache.jetspeed.exception.JetspeedException

getContext

public org.apache.jetspeed.PortalContext getContext()
Returns the context associated with this engine.

Specified by:
getContext in interface org.apache.jetspeed.engine.Engine
Returns:
an EngineContext associated with this engine

getRealPath

public String getRealPath(String path)
Given a application relative path, returns the real path relative to the application root

Specified by:
getRealPath in interface org.apache.jetspeed.engine.Engine

getPipeline

public org.apache.jetspeed.pipeline.Pipeline getPipeline(String pipelineName)
Specified by:
getPipeline in interface org.apache.jetspeed.engine.Engine

getPipeline

public org.apache.jetspeed.pipeline.Pipeline getPipeline()
Specified by:
getPipeline in interface org.apache.jetspeed.engine.Engine

getCurrentRequestContext

public org.apache.jetspeed.request.RequestContext getCurrentRequestContext()
Specified by:
getCurrentRequestContext in interface org.apache.jetspeed.engine.Engine
See Also:
Engine.getCurrentRequestContext()

getComponentManager

public org.apache.jetspeed.components.ComponentManager getComponentManager()
Specified by:
getComponentManager in interface org.apache.jetspeed.engine.Engine

getFactory

public org.apache.pluto.factory.Factory getFactory(Class theClass)

getFactory

Specified by:
getFactory in interface org.apache.pluto.services.factory.FactoryManagerService
Parameters:
theClass -
Returns:
See Also:
FactoryManagerService.getFactory(java.lang.Class)

getContainerService

public org.apache.pluto.services.ContainerService getContainerService(Class service)

getContainerService

Specified by:
getContainerService in interface org.apache.pluto.services.PortletContainerEnvironment
Parameters:
service -
Returns:
See Also:
PortletContainerEnvironment.getContainerService(java.lang.Class)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.