Class ServletContextResourceAccessor
- java.lang.Object
-
- com.atlassian.confluence.importexport.resource.ServletContextResourceAccessor
-
- All Implemented Interfaces:
ResourceAccessor
,org.springframework.beans.factory.Aware
,org.springframework.web.context.ServletContextAware
public class ServletContextResourceAccessor extends Object implements org.springframework.web.context.ServletContextAware, ResourceAccessor
An implementation ofResourceAccessor
that gets resources via the servlet context.
-
-
Constructor Summary
Constructors Constructor Description ServletContextResourceAccessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getResource(String resourcePath)
Returns an InputStream for reading a resource.void
setServletContext(javax.servlet.ServletContext servletContext)
-
-
-
Method Detail
-
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 interfaceResourceAccessor
- 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(javax.servlet.ServletContext servletContext)
- Specified by:
setServletContext
in interfaceorg.springframework.web.context.ServletContextAware
-
-