|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.servlet.PluginServletContextWrapper
public class PluginServletContextWrapper
A wrapper around servlet context that allows plugin servlets to add attributes which will not be shared/clobbered by other plugins.
| Constructor Summary | |
|---|---|
PluginServletContextWrapper(Plugin plugin,
javax.servlet.ServletContext context,
ConcurrentMap<String,Object> attributes,
Map<String,String> initParams)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginServletContextWrapper(Plugin plugin,
javax.servlet.ServletContext context,
ConcurrentMap<String,Object> attributes,
Map<String,String> initParams)
| Method Detail |
|---|
public Object getAttribute(String name)
Gets the named attribute. The attribute is first looked for in the local attribute map, if it is not found there it is looked for in the wrapped contexts attribute map. If it is not there, null is returned.
A consequence of this ordering is that servlets may, in their own context, override but not overwrite attributes from the wrapped context.
getAttribute in interface javax.servlet.ServletContextpublic Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.ServletContextpublic void removeAttribute(String name)
removeAttribute in interface javax.servlet.ServletContext
public void setAttribute(String name,
Object object)
Sets an attribute in the local attribute map, leaving the wrapped context untouched.
Servlets may use this and the lookup ordering of the
getAttribute() method to effectively override the value
of an attribute in the wrapped servlet context with their own value and
this overridden value will only be seen in the plugins own scope.
setAttribute in interface javax.servlet.ServletContextpublic String getInitParameter(String name)
getInitParameter in interface javax.servlet.ServletContextpublic Enumeration getInitParameterNames()
getInitParameterNames in interface javax.servlet.ServletContext
public URL getResource(String path)
throws MalformedURLException
getResource in interface javax.servlet.ServletContextMalformedURLExceptionpublic InputStream getResourceAsStream(String path)
getResourceAsStream in interface javax.servlet.ServletContextpublic javax.servlet.ServletContext getContext(String uripath)
getContext in interface javax.servlet.ServletContextpublic String getContextPath()
public int getMajorVersion()
getMajorVersion in interface javax.servlet.ServletContextpublic String getMimeType(String file)
getMimeType in interface javax.servlet.ServletContextpublic int getMinorVersion()
getMinorVersion in interface javax.servlet.ServletContextpublic javax.servlet.RequestDispatcher getNamedDispatcher(String name)
getNamedDispatcher in interface javax.servlet.ServletContextpublic String getRealPath(String path)
getRealPath in interface javax.servlet.ServletContextpublic javax.servlet.RequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher in interface javax.servlet.ServletContextpublic Set getResourcePaths(String arg0)
getResourcePaths in interface javax.servlet.ServletContextpublic String getServerInfo()
getServerInfo in interface javax.servlet.ServletContext
public javax.servlet.Servlet getServlet(String name)
throws javax.servlet.ServletException
getServlet in interface javax.servlet.ServletContextjavax.servlet.ServletExceptionpublic String getServletContextName()
getServletContextName in interface javax.servlet.ServletContextpublic Enumeration getServletNames()
getServletNames in interface javax.servlet.ServletContextpublic Enumeration getServlets()
getServlets in interface javax.servlet.ServletContext
public void log(Exception exception,
String msg)
log in interface javax.servlet.ServletContext
public void log(String message,
Throwable throwable)
log in interface javax.servlet.ServletContextpublic void log(String msg)
log in interface javax.servlet.ServletContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||