Class FlowRelativeResourceLoader
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
net.shibboleth.idp.profile.spring.factory.FlowRelativeResourceLoader
- All Implemented Interfaces:
ResourceLoader
This code is extended from org.springframework.webflow.engine.builder.model.FlowRelativeResourceLoader
with modifications to support proper lookup of resources via both filesystem and classpath along with
custom protocol-specific loaders.
This fills a gap for cases where the Spring
ResourceLoader
itself is fully replaced, versus
relying solely on customized behavior in the Spring contexts themselves.-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.io.DefaultResourceLoader
DefaultResourceLoader.ClassPathContextResource
-
Field Summary
FieldsFields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Resource
createFlowRelativeResource
(String location) getResource
(String location) protected Resource
getResourceByPath
(String path) Methods inherited from class org.springframework.core.io.DefaultResourceLoader
addProtocolResolver, clearResourceCaches, getProtocolResolvers, getResourceCache, setClassLoader
-
Field Details
-
flowResource
Flow resource for relative lookup.
-
-
Constructor Details
-
FlowRelativeResourceLoader
Constructor.- Parameters:
resource
- flow resource for relative lookup
-
-
Method Details
-
getClassLoader
- Specified by:
getClassLoader
in interfaceResourceLoader
- Overrides:
getClassLoader
in classDefaultResourceLoader
-
getResource
- Specified by:
getResource
in interfaceResourceLoader
- Overrides:
getResource
in classDefaultResourceLoader
-
createFlowRelativeResource
-
getResourceByPath
Overrides the standard behavior of path-only resources and treats them as file paths if the path exists. Note that this differs from the ordinary Spring contexts that default to file paths because paths are treated as absolute if they are in fact absolute.
- Overrides:
getResourceByPath
in classDefaultResourceLoader
-