Class PortletContextResourceLoader
- java.lang.Object
- org.springframework.core.io.DefaultResourceLoader
- org.springframework.web.portlet.context.PortletContextResourceLoader
- All Implemented Interfaces:
ResourceLoader
public class PortletContextResourceLoader extends DefaultResourceLoader
ResourceLoader implementation that resolves paths as PortletContext resources, for use outside a Portlet ApplicationContext (for example, in a GenericPortletBean subclass).Within a WebApplicationContext, resource paths are automatically resolved as PortletContext resources by the context implementation.
- Since:
- 2.0
- Author:
- Juergen Hoeller, John A. Lewis
- See Also:
getResourceByPath(java.lang.String)
,PortletContextResource
,GenericPortletBean
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.io.DefaultResourceLoader
DefaultResourceLoader.ClassPathContextResource
Field Summary
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
Constructor Summary
Constructors Constructor Description PortletContextResourceLoader(PortletContext portletContext)
Create a new PortletContextResourceLoader.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Resource
getResourceByPath(String path)
This implementation supports file paths beneath the root of the web application.Methods inherited from class org.springframework.core.io.DefaultResourceLoader
addProtocolResolver, getClassLoader, getProtocolResolvers, getResource, setClassLoader
Constructor Detail
PortletContextResourceLoader
public PortletContextResourceLoader(PortletContext portletContext)
Create a new PortletContextResourceLoader.- Parameters:
portletContext
- the PortletContext to load resources with
Method Detail
getResourceByPath
protected Resource getResourceByPath(String path)
This implementation supports file paths beneath the root of the web application.- Overrides:
getResourceByPath
in classDefaultResourceLoader
- Parameters:
path
- the path to the resource- Returns:
- the corresponding Resource handle
- See Also:
PortletContextResource