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 ResourcecreateFlowRelativeResource(String location) Return resource relative to the flowResource.getResource(String location) protected ResourcegetResourceByPath(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:
getClassLoaderin interfaceResourceLoader- Overrides:
getClassLoaderin classDefaultResourceLoader
-
getResource
- Specified by:
getResourcein interfaceResourceLoader- Overrides:
getResourcein classDefaultResourceLoader
-
createFlowRelativeResource
Return resource relative to the flowResource.- Parameters:
location- the resource location- Returns:
- a corresponding Resource handle
-
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:
getResourceByPathin classDefaultResourceLoader
-