com.atlassian.confluence.importexport.resource
Class ServletContextResourceAccessor
java.lang.Object
com.atlassian.confluence.importexport.resource.ServletContextResourceAccessor
- All Implemented Interfaces:
- ResourceAccessor, org.springframework.web.context.ServletContextAware
public class ServletContextResourceAccessor
- extends Object
- implements org.springframework.web.context.ServletContextAware, ResourceAccessor
An implementation of ResourceAccessor
that gets resources via the servlet context.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletContextResourceAccessor
public ServletContextResourceAccessor()
getResource
public InputStream getResource(String resourcePath)
- Description copied from interface:
ResourceAccessor
- Returns an InputStream for reading a resource. A new input stream is returned for each call to this method.
- Specified by:
getResource
in interface ResourceAccessor
- Parameters:
resourcePath
- the relative URL path of the resource. For example: /images/foo.png
- Returns:
- an
InputStream
for reading the resource
setServletContext
public void setServletContext(ServletContext servletContext)
- Specified by:
setServletContext
in interface org.springframework.web.context.ServletContextAware