org.apache.jetspeed
Class JetspeedPortalContext

java.lang.Object
  extended byorg.apache.jetspeed.JetspeedPortalContext
All Implemented Interfaces:
javax.portlet.PortalContext, PortalContext

public class JetspeedPortalContext
extends Object
implements PortalContext

Implementation of Portal Context associated with running thread of the engine

Version:
$Id: JetspeedPortalContext.java 225618 2005-07-27 20:34:42Z weaver $
Author:
David Sean Taylor

Field Summary
private  String applicationRoot
          The base from which the Jetspped application will operate.
private  HashMap attributes
          Runtime attributes.
private  org.apache.commons.configuration.Configuration configuration
          Configuration state
private  Engine engine
          The engine associated with this context.
private static String PORTAL_NAME_ATTR
           
private static String PORTAL_VERSION_ATTR
           
private  String portalName
           
private  String portalVersion
           
private  List portletModes
          Portlet Modes
private static String SUPPORTED_PORTLETMODE_ATTR
           
private static String SUPPORTED_WINDOWSTATE_ATTR
           
private  List windowStates
          Window States
 
Constructor Summary
JetspeedPortalContext(Engine engine, org.apache.commons.configuration.Configuration configuration, String applicationRoot)
           
 
Method Summary
 String getApplicationRoot()
          Returns the application root for this Jetspeed engine context.
 Object getAttribute(String name)
          Returns the engine attribute with the given name, or null if there is no attribute by that name.
 org.apache.commons.configuration.Configuration getConfiguration()
          Returns the configuration properties for this Jetspeed engine context.
 String getConfigurationProperty(String key)
           
 String getConfigurationProperty(String key, String defaultValue)
           
 Engine getEngine()
          Returns the engine associated with this context.
 String getPortalInfo()
           
 String getProperty(String name)
           
 Enumeration getPropertyNames()
           
 Enumeration getSupportedPortletModes()
           
 Enumeration getSupportedWindowStates()
           
 void setApplicationRoot(String applicationRoot)
          Sets the application root path for this Jetspeed engine context.
 void setAttribute(String name, Object value)
          Binds an object to a given attribute name in this servlet context.
 void setConfiguration(org.apache.commons.configuration.Configuration configuration)
          Set the configuration properties for this Jetspeed engine context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPPORTED_WINDOWSTATE_ATTR

private static final String SUPPORTED_WINDOWSTATE_ATTR
See Also:
Constant Field Values

SUPPORTED_PORTLETMODE_ATTR

private static final String SUPPORTED_PORTLETMODE_ATTR
See Also:
Constant Field Values

PORTAL_VERSION_ATTR

private static final String PORTAL_VERSION_ATTR
See Also:
Constant Field Values

PORTAL_NAME_ATTR

private static final String PORTAL_NAME_ATTR
See Also:
Constant Field Values

engine

private Engine engine
The engine associated with this context.


attributes

private HashMap attributes
Runtime attributes.


configuration

private org.apache.commons.configuration.Configuration configuration
Configuration state


applicationRoot

private String applicationRoot
The base from which the Jetspped application will operate.


portletModes

private final List portletModes
Portlet Modes


windowStates

private final List windowStates
Window States


portalName

private final String portalName

portalVersion

private final String portalVersion
Constructor Detail

JetspeedPortalContext

public JetspeedPortalContext(Engine engine,
                             org.apache.commons.configuration.Configuration configuration,
                             String applicationRoot)
Method Detail

getConfiguration

public org.apache.commons.configuration.Configuration getConfiguration()
Returns the configuration properties for this Jetspeed engine context.

Specified by:
getConfiguration in interface PortalContext
Returns:
a Configuration containing the configuration properties for this Jetspeed context.

getConfigurationProperty

public String getConfigurationProperty(String key)
Specified by:
getConfigurationProperty in interface PortalContext

getConfigurationProperty

public String getConfigurationProperty(String key,
                                       String defaultValue)
Specified by:
getConfigurationProperty in interface PortalContext

setConfiguration

public void setConfiguration(org.apache.commons.configuration.Configuration configuration)
Set the configuration properties for this Jetspeed engine context.

Specified by:
setConfiguration in interface PortalContext
Parameters:
configuration - - the configuration properties

getApplicationRoot

public String getApplicationRoot()
Returns the application root for this Jetspeed engine context.

Specified by:
getApplicationRoot in interface PortalContext
Returns:
a String containing the application root path for this Jetspeed context.

setApplicationRoot

public void setApplicationRoot(String applicationRoot)
Sets the application root path for this Jetspeed engine context.

Specified by:
setApplicationRoot in interface PortalContext
Parameters:
applicationRoot - - the applicationRoot path on the file system.

getEngine

public Engine getEngine()
Returns the engine associated with this context.

Specified by:
getEngine in interface PortalContext
Returns:
an Engine associated with this context

getAttribute

public Object getAttribute(String name)
Returns the engine attribute with the given name, or null if there is no attribute by that name.

Specified by:
getAttribute in interface PortalContext
Returns:
an Object containing the value of the attribute, or null if no attribute exists matching the given name

setAttribute

public void setAttribute(String name,
                         Object value)
Binds an object to a given attribute name in this servlet context.

Specified by:
setAttribute in interface PortalContext
Parameters:
name - - a String specifying the name of the attribute
value - - an Object representing the attribute to be bound

getProperty

public String getProperty(String name)
Specified by:
getProperty in interface javax.portlet.PortalContext

getPropertyNames

public Enumeration getPropertyNames()
Specified by:
getPropertyNames in interface javax.portlet.PortalContext

getSupportedPortletModes

public Enumeration getSupportedPortletModes()
Specified by:
getSupportedPortletModes in interface javax.portlet.PortalContext

getSupportedWindowStates

public Enumeration getSupportedWindowStates()
Specified by:
getSupportedWindowStates in interface javax.portlet.PortalContext

getPortalInfo

public String getPortalInfo()
Specified by:
getPortalInfo in interface javax.portlet.PortalContext


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