Top Description Fields Constructors Methods
org.springframework.jdbc.config

public Class SortedResourcesFactoryBean

extends AbstractFactoryBean<Resource[]>
implements ResourceLoaderAware
Class Inheritance
All Implemented Interfaces
org.springframework.context.ResourceLoaderAware, org.springframework.beans.factory.Aware
Imports
java.io.IOException, java.util.ArrayList, .Arrays, .List, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.config.AbstractFactoryBean, org.springframework.context.ResourceLoaderAware, org.springframework.core.io.Resource, .ResourceLoader, org.springframework.core.io.support.PathMatchingResourcePatternResolver, .ResourcePatternResolver, .ResourcePatternUtils

FactoryBean implementation that takes a list of location Strings and creates a sorted array of Resource instances.
Authors
Dave Syer, Juergen Hoeller, Christian Dupuis
Since
3.0

Field Summary

Modifier and TypeField and Description
private final List<String>
private ResourcePatternResolver
Inherited from org.springframework.beans.factory.config.AbstractFactoryBean:
logger

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected Resource[]
createInstance()

Implements abstract org.springframework.beans.factory.config.AbstractFactoryBean.createInstance.

Template method that subclasses must override to construct the object returned by this factory.

public Class<? extends Resource[]>
getObjectType()

Implements abstract org.springframework.beans.factory.config.AbstractFactoryBean.getObjectType.

Implements org.springframework.beans.factory.FactoryBean.getObjectType.

This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.

public void
setResourceLoader(ResourceLoader
the ResourceLoader object to be used by this object
resourceLoader
)

Implements org.springframework.context.ResourceLoaderAware.setResourceLoader.

Set the ResourceLoader that this object runs in.

This might be a ResourcePatternResolver, which can be checked through instanceof ResourcePatternResolver.

Inherited from org.springframework.beans.factory.config.AbstractFactoryBean:
afterPropertiesSetdestroydestroyInstancegetBeanFactorygetBeanTypeConvertergetEarlySingletonInterfacesgetObjectisSingletonsetBeanClassLoadersetBeanFactorysetSingleton

Field Detail

locationsback to summary
private final List<String> locations
resourcePatternResolverback to summary
private ResourcePatternResolver resourcePatternResolver

Constructor Detail

SortedResourcesFactoryBeanback to summary
public SortedResourcesFactoryBean(List<String> locations)
SortedResourcesFactoryBeanback to summary
public SortedResourcesFactoryBean(ResourceLoader resourceLoader, List<String> locations)

Method Detail

createInstanceback to summary
protected Resource[] createInstance() throws Exception

Implements abstract org.springframework.beans.factory.config.AbstractFactoryBean.createInstance.

Doc from org.springframework.beans.factory.config.AbstractFactoryBean.createInstance.

Template method that subclasses must override to construct the object returned by this factory.

Invoked on initialization of this FactoryBean in case of a singleton; else, on each getObject() call.

Returns:Resource[]

the object returned by this factory

Annotations
@Override
Exceptions
Exception:
if an exception occurred during object creation
getObjectTypeback to summary
public Class<? extends Resource[]> getObjectType()

Implements abstract org.springframework.beans.factory.config.AbstractFactoryBean.getObjectType.

Implements org.springframework.beans.factory.FactoryBean.getObjectType.

Doc from org.springframework.beans.factory.config.AbstractFactoryBean.getObjectType.

This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.

Returns:Class<? extends Resource[]>

Doc from org.springframework.beans.factory.FactoryBean.getObjectType.

the type of object that this FactoryBean creates, or null if not known at the time of the call

Annotations
@Override
setResourceLoaderback to summary
public void setResourceLoader(ResourceLoader resourceLoader)

Implements org.springframework.context.ResourceLoaderAware.setResourceLoader.

Doc from org.springframework.context.ResourceLoaderAware.setResourceLoader.

Set the ResourceLoader that this object runs in.

This might be a ResourcePatternResolver, which can be checked through instanceof ResourcePatternResolver. See also the ResourcePatternUtils.getResourcePatternResolver method.

Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked before ApplicationContextAware's setApplicationContext.

Parameters
resourceLoader:ResourceLoader

the ResourceLoader object to be used by this object

Annotations
@Override