org.springframework.osgi.io
Class OsgiBundleResourcePatternResolver
java.lang.Object
org.springframework.core.io.support.PathMatchingResourcePatternResolver
org.springframework.osgi.io.OsgiBundleResourcePatternResolver
- All Implemented Interfaces:
- ResourceLoader, ResourcePatternResolver
public class OsgiBundleResourcePatternResolver
- extends PathMatchingResourcePatternResolver
OSGi-aware ResourcePatternResolver
.
Can find resources in the bundle jar and bundle space.
See OsgiBundleResource
for more information.
Note: classpath:
and
classpath*:
prefixes are not (yet) supported as there are no
methods for doing classpath discovery. A future version might add such
functionality.
- Author:
- Costin Leau
- See Also:
Bundle
,
OsgiBundleResource
Method Summary |
Resource[] |
getResources(String locationPattern)
|
protected boolean |
isJarResource(Resource resource)
Overrides the default check up since computing the URL can be fairly
expensive operation as there is no caching (due to the framework dynamic
nature). |
Methods inherited from class org.springframework.core.io.support.PathMatchingResourcePatternResolver |
convertClassLoaderURL, determineRootDir, doFindMatchingFileSystemResources, doFindPathMatchingFileResources, doFindPathMatchingJarResources, doRetrieveMatchingFiles, findAllClassPathResources, findPathMatchingResources, getClassLoader, getPathMatcher, getResource, getResourceLoader, retrieveMatchingFiles, setPathMatcher |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OsgiBundleResourcePatternResolver
public OsgiBundleResourcePatternResolver(Bundle bundle)
OsgiBundleResourcePatternResolver
public OsgiBundleResourcePatternResolver(ResourceLoader resourceLoader)
getResources
public Resource[] getResources(String locationPattern)
throws IOException
- Specified by:
getResources
in interface ResourcePatternResolver
- Overrides:
getResources
in class PathMatchingResourcePatternResolver
- Throws:
IOException
isJarResource
protected boolean isJarResource(Resource resource)
throws IOException
-
Overrides the default check up since computing the URL can be fairly
expensive operation as there is no caching (due to the framework dynamic
nature).
- Overrides:
isJarResource
in class PathMatchingResourcePatternResolver
- Throws:
IOException
Copyright © 2006-2008 Spring Framework. All Rights Reserved.