public final class SpringSupport extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static Logger |
LOG
Logger.
|
static QName |
SPRING_BEANS_ELEMENT_NAME
Spring beans element name.
|
| Modifier | Constructor and Description |
|---|---|
private |
SpringSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static BeanFactory |
createBeanFactory(Element springBeans)
Creates a Spring bean factory from the supplied Spring beans element.
|
static ManagedList<String> |
getAttributeValueAsManagedList(Attr attribute)
Gets the value of a list-type attribute as a
ManagedList. |
static <T> T |
getBean(BeanFactory beanFactory,
Class<T> clazz)
Retrieves the bean of the supplied type from the supplied bean factory.
|
static ManagedList<String> |
getElementTextContentAsManagedList(Collection<Element> elements)
Gets the text content of a list of
Elements as a ManagedList. |
static GenericApplicationContext |
newContext(String name,
List<Resource> configurationResources,
List<BeanFactoryPostProcessor> factoryPostProcessors,
List<BeanPostProcessor> postProcessors,
List<ApplicationContextInitializer> initializers,
ApplicationContext parentContext)
Creates a new, started, application context from the given configuration resources.
|
static BeanDefinition |
parseCustomElement(Element element,
ParserContext parserContext)
Parse an element into a bean definition.
|
static ManagedList<BeanDefinition> |
parseCustomElements(Collection<Element> elements,
ParserContext parserContext)
Parse list of elements into bean definitions.
|
static void |
parseNativeElement(Element springBeans,
BeanDefinitionRegistry registry)
Parse the provided Element into the provided registry.
|
@Nonnull public static final QName SPRING_BEANS_ELEMENT_NAME
@Nonnull public static GenericApplicationContext newContext(@Nonnull@NotEmpty String name, @Nonnull@NonnullElements List<Resource> configurationResources, @Nonnull@NonnullElements List<BeanFactoryPostProcessor> factoryPostProcessors, @Nonnull@NonnullElements List<BeanPostProcessor> postProcessors, @Nonnull@NonnullElements List<ApplicationContextInitializer> initializers, @Nullable ApplicationContext parentContext)
name - name of the application contextconfigurationResources - configuration resourcesfactoryPostProcessors - post processors to injectpostProcessors - post processors to injectinitializers - application context initializersparentContext - parent context, or null if there is no parent@Nullable public static ManagedList<BeanDefinition> parseCustomElements(@Nullable@NonnullElements Collection<Element> elements, @Nonnull ParserContext parserContext)
elements - list of elements to parseparserContext - current parsing context@Nullable public static BeanDefinition parseCustomElement(@Nullable Element element, @Nonnull ParserContext parserContext)
element - the element to parseparserContext - current parsing contextpublic static void parseNativeElement(@Nonnull Element springBeans, @Nullable BeanDefinitionRegistry registry)
springBeans - the element to parseregistry - the registry to populate@Nonnull public static BeanFactory createBeanFactory(@Nonnull Element springBeans)
springBeans - to create bean factory from@Nullable public static <T> T getBean(@Nonnull BeanFactory beanFactory, @Nonnull Class<T> clazz)
T - type of bean to returnbeanFactory - to get the bean fromclazz - type of the bean to retrieve@Nonnull public static ManagedList<String> getAttributeValueAsManagedList(@Nullable Attr attribute)
ManagedList.attribute - attribute whose value will be turned into a list@Nonnull public static ManagedList<String> getElementTextContentAsManagedList(@Nullable Collection<Element> elements)
Elements as a ManagedList.elements - the elements whose values will be turned into a listCopyright © 1999–2016 Shibboleth Consortium. All rights reserved.