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 ofResourceAccessorthat 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 InputStreamgetResource(String resourcePath)Returns an InputStream for reading a resource.voidsetServletContext(javax.servlet.ServletContext servletContext)
-
-
-
Method Detail
-
getResource
public InputStream getResource(String resourcePath)
Description copied from interface:ResourceAccessorReturns an InputStream for reading a resource. A new input stream is returned for each call to this method.- Specified by:
getResourcein interfaceResourceAccessor- Parameters:
resourcePath- the relative URL path of the resource. For example: /images/foo.png- Returns:
- an
InputStreamfor reading the resource
-
setServletContext
public void setServletContext(javax.servlet.ServletContext servletContext)
- Specified by:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware
-
-