org.apache.pluto.internal.impl
Class PortletContextImpl

java.lang.Object
  extended by org.apache.pluto.internal.impl.PortletContextImpl
All Implemented Interfaces:
javax.portlet.PortletContext, InternalPortletContext

public class PortletContextImpl
extends java.lang.Object
implements javax.portlet.PortletContext, InternalPortletContext

Pluto's Portlet Context Implementation. This class implements the InternalPortletContext which provides container specific information needed for processing.

Version:
1.1

Constructor Summary
PortletContextImpl(java.lang.String portletApplicationId, javax.servlet.ServletContext servletContext, PortletAppDD portletAppDD)
          Constructs an instance.
 
Method Summary
 java.lang.String getApplicationId()
          Retrieve the unique identifier for the portlet context.
 java.lang.String getApplicationName()
           
 java.lang.Object getAttribute(java.lang.String name)
           
 java.util.Enumeration getAttributeNames()
           
 java.lang.ClassLoader getContextClassLoader()
          ClassLoader associated with this context.
 java.lang.String getInitParameter(java.lang.String name)
           
 java.util.Enumeration getInitParameterNames()
           
 int getMajorVersion()
           
 java.lang.String getMimeType(java.lang.String file)
           
 int getMinorVersion()
           
 javax.portlet.PortletRequestDispatcher getNamedDispatcher(java.lang.String name)
           
 PortletAppDD getPortletApplicationDefinition()
           
 java.lang.String getPortletContextName()
           
 java.lang.String getRealPath(java.lang.String path)
           
 javax.portlet.PortletRequestDispatcher getRequestDispatcher(java.lang.String path)
           
 java.net.URL getResource(java.lang.String path)
           
 java.io.InputStream getResourceAsStream(java.lang.String path)
           
 java.util.Set getResourcePaths(java.lang.String path)
           
 java.lang.String getServerInfo()
          Retrieve the PortletContainer's server info.
 javax.servlet.ServletContext getServletContext()
           
 void log(java.lang.String msg)
           
 void log(java.lang.String message, java.lang.Throwable throwable)
           
 void removeAttribute(java.lang.String name)
           
 void setAttribute(java.lang.String name, java.lang.Object object)
           
 void setContextClassLoader(java.lang.ClassLoader contextClassLoader)
          ClassLoader associated with this context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletContextImpl

public PortletContextImpl(java.lang.String portletApplicationId,
                          javax.servlet.ServletContext servletContext,
                          PortletAppDD portletAppDD)
Constructs an instance.

Parameters:
servletContext - the servlet context in which we are contained.
portletAppDD - the portlet application descriptor.
portletApplicationId - applicationId
Method Detail

getApplicationId

public java.lang.String getApplicationId()
Description copied from interface: InternalPortletContext
Retrieve the unique identifier for the portlet context.

Specified by:
getApplicationId in interface InternalPortletContext
Returns:
unique identifier.

getApplicationName

public java.lang.String getApplicationName()

getContextClassLoader

public java.lang.ClassLoader getContextClassLoader()
ClassLoader associated with this context.

Returns:

setContextClassLoader

public void setContextClassLoader(java.lang.ClassLoader contextClassLoader)
ClassLoader associated with this context.

Parameters:
contextClassLoader -

getServerInfo

public java.lang.String getServerInfo()
Retrieve the PortletContainer's server info.

Specified by:
getServerInfo in interface javax.portlet.PortletContext
Returns:
the server info in the form of Server/Version
See Also:
Environment.getServerInfo()

getRequestDispatcher

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

getNamedDispatcher

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

getResourceAsStream

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

getMajorVersion

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

getMinorVersion

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

getMimeType

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

getRealPath

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

getResourcePaths

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

getResource

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

getAttribute

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

getAttributeNames

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

getInitParameter

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

getInitParameterNames

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

log

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

log

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

removeAttribute

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

setAttribute

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

getPortletContextName

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

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface InternalPortletContext
Returns:
servlet context within which we belong

getPortletApplicationDefinition

public PortletAppDD getPortletApplicationDefinition()
Specified by:
getPortletApplicationDefinition in interface InternalPortletContext
Returns:
application config


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.