org.apache.jetspeed.container
Class JetspeedPortletContext

java.lang.Object
  extended byorg.apache.jetspeed.container.JetspeedPortletContext
All Implemented Interfaces:
InternalPortletContext, javax.portlet.PortletContext

public class JetspeedPortletContext
extends Object
implements javax.portlet.PortletContext, InternalPortletContext

Implements the Portlet API Portlet Context class TODO: on LOCAL apps, we need to merge in web.xml props. See PLT 10.3

Version:
$Id: JetspeedPortletContext.java 231336 2005-08-10 21:50:43Z shinsuke $
Author:
David Sean Taylor

Field Summary
private  org.apache.jetspeed.om.common.portlet.MutablePortletApplication application
           
static String LOCAL_PA_ROOT
          The path to the Local Portlet Apps directory
private  javax.servlet.ServletContext servletContext
           
 
Constructor Summary
JetspeedPortletContext(javax.servlet.ServletContext servletContext, org.apache.pluto.om.portlet.PortletApplicationDefinition application)
           
 
Method Summary
 org.apache.pluto.om.portlet.PortletApplicationDefinition getApplication()
           
 Object getAttribute(String name)
           
 Enumeration getAttributeNames()
           
 String getInitParameter(String name)
           
 Enumeration getInitParameterNames()
           
 int getMajorVersion()
           
 String getMimeType(String file)
           
 int getMinorVersion()
           
 javax.portlet.PortletRequestDispatcher getNamedDispatcher(String name)
           
 String getPortletContextName()
           
 String getRealPath(String path)
           
 javax.portlet.PortletRequestDispatcher getRequestDispatcher(String path)
           
 URL getResource(String path)
           
 InputStream getResourceAsStream(String path)
           
 Set getResourcePaths(String path)
           
 String getServerInfo()
           
 javax.servlet.ServletContext getServletContext()
           
private  String localizePath(String path, org.apache.jetspeed.om.common.portlet.MutablePortletApplication app)
           
 void log(String msg)
           
 void log(String message, Throwable throwable)
           
 void removeAttribute(String name)
           
 void setAttribute(String name, Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCAL_PA_ROOT

public static final String LOCAL_PA_ROOT
The path to the Local Portlet Apps directory

See Also:
Constant Field Values

servletContext

private javax.servlet.ServletContext servletContext

application

private org.apache.jetspeed.om.common.portlet.MutablePortletApplication application
Constructor Detail

JetspeedPortletContext

public JetspeedPortletContext(javax.servlet.ServletContext servletContext,
                              org.apache.pluto.om.portlet.PortletApplicationDefinition application)
Method Detail

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface javax.portlet.PortletContext

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface javax.portlet.PortletContext

getResourcePaths

public Set getResourcePaths(String path)
Specified by:
getResourcePaths in interface javax.portlet.PortletContext

getRequestDispatcher

public javax.portlet.PortletRequestDispatcher getRequestDispatcher(String path)
Specified by:
getRequestDispatcher in interface javax.portlet.PortletContext

getNamedDispatcher

public javax.portlet.PortletRequestDispatcher getNamedDispatcher(String name)
Specified by:
getNamedDispatcher in interface javax.portlet.PortletContext

getMimeType

public String getMimeType(String file)
Specified by:
getMimeType in interface javax.portlet.PortletContext

getResourceAsStream

public InputStream getResourceAsStream(String path)
Specified by:
getResourceAsStream in interface javax.portlet.PortletContext

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface javax.portlet.PortletContext

log

public void log(String msg)
Specified by:
log in interface javax.portlet.PortletContext

log

public void log(String message,
                Throwable throwable)
Specified by:
log in interface javax.portlet.PortletContext

getRealPath

public String getRealPath(String path)
Specified by:
getRealPath in interface javax.portlet.PortletContext

getResource

public URL getResource(String path)
                throws MalformedURLException
Specified by:
getResource in interface javax.portlet.PortletContext
Throws:
MalformedURLException

getAttributeNames

public Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface javax.portlet.PortletContext

getInitParameter

public String getInitParameter(String name)
Specified by:
getInitParameter in interface javax.portlet.PortletContext

getInitParameterNames

public Enumeration getInitParameterNames()
Specified by:
getInitParameterNames in interface javax.portlet.PortletContext

removeAttribute

public void removeAttribute(String name)
Specified by:
removeAttribute in interface javax.portlet.PortletContext

setAttribute

public void setAttribute(String name,
                         Object object)
Specified by:
setAttribute in interface javax.portlet.PortletContext

getServerInfo

public String getServerInfo()
Specified by:
getServerInfo in interface javax.portlet.PortletContext

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface InternalPortletContext

getApplication

public org.apache.pluto.om.portlet.PortletApplicationDefinition getApplication()
Specified by:
getApplication in interface InternalPortletContext
See Also:
InternalPortletContext.getApplication()

getPortletContextName

public String getPortletContextName()
Specified by:
getPortletContextName in interface javax.portlet.PortletContext

localizePath

private String localizePath(String path,
                            org.apache.jetspeed.om.common.portlet.MutablePortletApplication app)


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