|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.io.support.PathMatchingResourcePatternResolver org.springframework.osgi.io.OsgiBundleResourcePatternResolver
public class OsgiBundleResourcePatternResolver
OSGi-aware subclass of PathMatchingResourcePatternResolver.
Can find resources in the bundle jar, bundle space or class space. See
OsgiBundleResource
for more information.
Bundle
,
OsgiBundleResource
Field Summary |
---|
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
---|
CLASSPATH_ALL_URL_PREFIX |
Fields inherited from interface org.springframework.core.io.ResourceLoader |
---|
CLASSPATH_URL_PREFIX |
Constructor Summary | |
---|---|
OsgiBundleResourcePatternResolver(Bundle bundle)
|
|
OsgiBundleResourcePatternResolver(ResourceLoader resourceLoader)
|
Method Summary | |
---|---|
protected Set |
doFindPathMatchingFileResources(Resource rootDirResource,
String subPattern,
int searchType)
Based on the search type, use the approapriate method |
protected void |
doRetrieveMatchingBundleEntries(Bundle bundle,
String fullPattern,
String dir,
Set result,
int searchType)
Seach each level inside the bundle for entries based on the search strategy chosen. |
protected Resource[] |
findPathMatchingResources(String locationPattern,
int searchType)
Override it to pass in the searchType parameter. |
Resource[] |
getResources(String locationPattern)
|
protected String |
handleString(String path)
Handle candidates returned as Strings. |
protected String |
handleURL(URL path)
Handle candidates returned as URLs. |
Methods inherited from class org.springframework.core.io.support.PathMatchingResourcePatternResolver |
---|
convertClassLoaderURL, determineRootDir, doFindMatchingFileSystemResources, doFindPathMatchingFileResources, doFindPathMatchingJarResources, doRetrieveMatchingFiles, findAllClassPathResources, findPathMatchingResources, getClassLoader, getPathMatcher, getResource, getResourceLoader, isJarResource, retrieveMatchingFiles, setPathMatcher |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OsgiBundleResourcePatternResolver(Bundle bundle)
public OsgiBundleResourcePatternResolver(ResourceLoader resourceLoader)
Method Detail |
---|
public Resource[] getResources(String locationPattern) throws IOException
getResources
in interface ResourcePatternResolver
getResources
in class PathMatchingResourcePatternResolver
IOException
protected Resource[] findPathMatchingResources(String locationPattern, int searchType) throws IOException
IOException
protected Set doFindPathMatchingFileResources(Resource rootDirResource, String subPattern, int searchType) throws IOException
IOException
OsgiBundleResource.BUNDLE_URL_PREFIX
,
PathMatchingResourcePatternResolver.getResources(java.lang.String)
protected void doRetrieveMatchingBundleEntries(Bundle bundle, String fullPattern, String dir, Set result, int searchType) throws IOException
bundle
- the bundle to do the lookupfullPattern
- matching patterndir
- directory inside the bundleresult
- set of results (used to concatenate matching sub dirs)searchType
- the search strategy to use
IOException
protected String handleURL(URL path)
path
-
protected String handleString(String path)
path
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |