Package io.jmix.core.impl
Class ResourcesImpl
java.lang.Object
io.jmix.core.impl.ResourcesImpl
- All Implemented Interfaces:
- Resources,- org.springframework.beans.factory.Aware,- org.springframework.context.ResourceLoaderAware,- org.springframework.core.io.ResourceLoader
- 
Field SummaryFields inherited from interface org.springframework.core.io.ResourceLoaderCLASSPATH_URL_PREFIX
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.springframework.core.io.ResourcegetResource(String location) Search for a resource according to the following rules: If the location represents an URL, return a newUrlResourcefor this URL. Try to find a file below theconfdirectory usinglocationas relative path.getResourceAsStream(String location) Searches for a resource according to the rules explained inResourcesand returns the resource as stream if found.getResourceAsString(String location) Searches for a resource according to the rules explained inResourcesand returns the resource as string if found.voidsetResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) 
- 
Constructor Details- 
ResourcesImpl@Autowired public ResourcesImpl(org.springframework.core.env.Environment environment) 
 
- 
- 
Method Details- 
getResourceAsStreamDescription copied from interface:ResourcesSearches for a resource according to the rules explained inResourcesand returns the resource as stream if found. The returned stream should be closed after use.- Specified by:
- getResourceAsStreamin interface- Resources
- Parameters:
- location- resource location
- Returns:
- InputStream or null if the resource is not found
 
- 
getResourceAsStringDescription copied from interface:ResourcesSearches for a resource according to the rules explained inResourcesand returns the resource as string if found.- Specified by:
- getResourceAsStringin interface- Resources
- Parameters:
- location- resource location
- Returns:
- resource content or null if the resource is not found
 
- 
getResourceSearch for a resource according to the following rules:- If the location represents an URL, return a new UrlResourcefor this URL.
- Try to find a file below the confdirectory usinglocationas relative path. If found, return a newUrlResourcefor this file.
-  Otherwise return a new ClassPathResourceto retrieve content from classpath.
 - Specified by:
- getResourcein interface- org.springframework.core.io.ResourceLoader
- Parameters:
- location- resource location
- Returns:
- resource reference
 
- If the location represents an URL, return a new 
- 
getClassLoader- Specified by:
- getClassLoaderin interface- org.springframework.core.io.ResourceLoader
 
- 
setResourceLoaderpublic void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
- setResourceLoaderin interface- org.springframework.context.ResourceLoaderAware
 
 
-