org.apache.cocoon.environment.impl
Class AbstractContext

java.lang.Object
  extended byorg.apache.cocoon.environment.impl.AbstractContext
All Implemented Interfaces:
org.apache.cocoon.environment.Context, ServletContext
Direct Known Subclasses:
HttpContext

public abstract class AbstractContext
extends Object
implements org.apache.cocoon.environment.Context, ServletContext

Base class for any context

Version:
$Id: AbstractContext.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected  Map attributes
          Attributes.
 
Constructor Summary
AbstractContext()
           
 
Method Summary
 Object getAttribute(String key)
           
 Enumeration getAttributeNames()
           
 Map getAttributes()
           
 ServletContext getContext(String arg0)
           
 String getInitParameter(String arg0)
           
 Enumeration getInitParameterNames()
           
 int getMajorVersion()
           
 String getMimeType(String arg0)
           
 int getMinorVersion()
           
 RequestDispatcher getNamedDispatcher(String arg0)
           
 String getRealPath(String arg0)
           
 RequestDispatcher getRequestDispatcher(String arg0)
           
 URL getResource(String arg0)
           
 InputStream getResourceAsStream(String path)
          Get access to the resource as @link InputStream.
 Set getResourcePaths(String arg0)
           
 String getServerInfo()
           
 Servlet getServlet(String arg0)
           
 String getServletContextName()
           
 Enumeration getServletNames()
           
 Enumeration getServlets()
           
 void removeAttribute(String key)
           
 void setAttribute(String key, Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletContext
log, log, log
 

Field Detail

attributes

protected final Map attributes
Attributes.

Constructor Detail

AbstractContext

public AbstractContext()
Method Detail

getAttribute

public Object getAttribute(String key)
Specified by:
getAttribute in interface org.apache.cocoon.environment.Context
See Also:
ServletContext.getAttribute(java.lang.String)

getAttributeNames

public Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface org.apache.cocoon.environment.Context
See Also:
ServletContext.getAttributeNames()

getContext

public ServletContext getContext(String arg0)
Specified by:
getContext in interface ServletContext
See Also:
ServletContext.getContext(java.lang.String)

getInitParameter

public String getInitParameter(String arg0)
Specified by:
getInitParameter in interface org.apache.cocoon.environment.Context
See Also:
ServletContext.getInitParameter(java.lang.String)

getInitParameterNames

public Enumeration getInitParameterNames()
Specified by:
getInitParameterNames in interface ServletContext
See Also:
ServletContext.getInitParameterNames()

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface ServletContext
See Also:
ServletContext.getMajorVersion()

getMimeType

public String getMimeType(String arg0)
Specified by:
getMimeType in interface org.apache.cocoon.environment.Context
See Also:
ServletContext.getMimeType(java.lang.String)

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface ServletContext
See Also:
ServletContext.getMinorVersion()

getNamedDispatcher

public RequestDispatcher getNamedDispatcher(String arg0)
Specified by:
getNamedDispatcher in interface ServletContext
See Also:
ServletContext.getNamedDispatcher(java.lang.String)

getRealPath

public String getRealPath(String arg0)
Specified by:
getRealPath in interface org.apache.cocoon.environment.Context
See Also:
ServletContext.getRealPath(java.lang.String)

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(String arg0)
Specified by:
getRequestDispatcher in interface ServletContext
See Also:
ServletContext.getRequestDispatcher(java.lang.String)

getResource

public URL getResource(String arg0)
                throws MalformedURLException
Specified by:
getResource in interface org.apache.cocoon.environment.Context
Throws:
MalformedURLException
See Also:
ServletContext.getResource(java.lang.String)

getResourceAsStream

public InputStream getResourceAsStream(String path)
Get access to the resource as @link InputStream. If there is any problem, null is returned.

Specified by:
getResourceAsStream in interface org.apache.cocoon.environment.Context
See Also:
ServletContext.getResourceAsStream(java.lang.String)

getResourcePaths

public Set getResourcePaths(String arg0)
Specified by:
getResourcePaths in interface ServletContext
See Also:
ServletContext.getResourcePaths(java.lang.String)

getServerInfo

public String getServerInfo()
Specified by:
getServerInfo in interface ServletContext
See Also:
ServletContext.getServerInfo()

getServlet

public Servlet getServlet(String arg0)
                   throws ServletException
Specified by:
getServlet in interface ServletContext
Throws:
ServletException
See Also:
ServletContext.getServlet(java.lang.String)

getServletContextName

public String getServletContextName()
Specified by:
getServletContextName in interface ServletContext
See Also:
ServletContext.getServletContextName()

getServletNames

public Enumeration getServletNames()
Specified by:
getServletNames in interface ServletContext
See Also:
ServletContext.getServletNames()

getServlets

public Enumeration getServlets()
Specified by:
getServlets in interface ServletContext
See Also:
ServletContext.getServlets()

removeAttribute

public void removeAttribute(String key)
Specified by:
removeAttribute in interface org.apache.cocoon.environment.Context
See Also:
ServletContext.removeAttribute(java.lang.String)

setAttribute

public void setAttribute(String key,
                         Object object)
Specified by:
setAttribute in interface org.apache.cocoon.environment.Context
See Also:
ServletContext.setAttribute(java.lang.String, java.lang.Object)

getAttributes

public Map getAttributes()
Specified by:
getAttributes in interface org.apache.cocoon.environment.Context
See Also:
Context.getAttributes()


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.