edu.internet2.middleware.shibboleth.common.config
Class SpringConfigurationUtils

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.config.SpringConfigurationUtils

public final class SpringConfigurationUtils
extends Object

Utilities to help configure Spring beans.


Method Summary
static RuntimeBeanReference parseCustomElement(Element element, ParserContext parserContext)
          Parses a bean definition using an xsi:type aware version of BeanDefinitionParserDelegate.parseCustomElement(Element).
static RuntimeBeanReference parseCustomElement(Element element, String idAttribute, ParserContext parserContext)
          Parses a bean definition using an xsi:type aware version of BeanDefinitionParserDelegate.parseCustomElement(Element).
static RuntimeBeanReference parseCustomElementReference(Element element, String refAttribute, ParserContext parserContext)
          Parses a custom element that is a reference to a bean declared elsewhere.
static ManagedList parseCustomElements(List<Element> elements, ParserContext parserContext)
          Parse list of elements into bean definitions.
static ManagedList parseCustomElements(List<Element> elements, String idAttribute, ParserContext parserContext)
          Parse list of elements into bean definitions.
static BeanDefinition parseInnerCustomElement(Element element, ParserContext parserContext)
          Parses a bean definition using an xsi:type aware version of BeanDefinitionParserDelegate.parseCustomElement(Element).
static ManagedList parseInnerCustomElements(List<Element> elements, ParserContext parserContext)
          Parser a list of bean definitions using an xsi:type aware version of BeanDefinitionParserDelegate.parseCustomElement(Element).
static void populateRegistry(BeanDefinitionRegistry beanRegistry, List<org.opensaml.util.resource.Resource> configurationResources)
          Loads a set of spring configuration resources into a given application context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

populateRegistry

public static void populateRegistry(BeanDefinitionRegistry beanRegistry,
                                    List<org.opensaml.util.resource.Resource> configurationResources)
                             throws org.opensaml.util.resource.ResourceException
Loads a set of spring configuration resources into a given application context.

Parameters:
beanRegistry - registry of spring beans to be populated with information from the given configurations
configurationResources - list of spring configuration resources
Throws:
org.opensaml.util.resource.ResourceException - thrown if there is a problem reading the spring configuration resources into the registry

parseInnerCustomElement

public static BeanDefinition parseInnerCustomElement(Element element,
                                                     ParserContext parserContext)
Parses a bean definition using an xsi:type aware version of BeanDefinitionParserDelegate.parseCustomElement(Element).

Parameters:
element - configuration element
parserContext - current parser context
Returns:
bean definition

parseInnerCustomElements

public static ManagedList parseInnerCustomElements(List<Element> elements,
                                                   ParserContext parserContext)
Parser a list of bean definitions using an xsi:type aware version of BeanDefinitionParserDelegate.parseCustomElement(Element).

Parameters:
elements - configuration elements
parserContext - current parser context
Returns:
list of bean definition

parseCustomElement

public static RuntimeBeanReference parseCustomElement(Element element,
                                                      ParserContext parserContext)
Parses a bean definition using an xsi:type aware version of BeanDefinitionParserDelegate.parseCustomElement(Element). Assumes the element has an attribute 'id' that provides a unique identifier for the bean.

Parameters:
element - element to parse
parserContext - current parser context
Returns:
bean definition reference

parseCustomElement

public static RuntimeBeanReference parseCustomElement(Element element,
                                                      String idAttribute,
                                                      ParserContext parserContext)
Parses a bean definition using an xsi:type aware version of BeanDefinitionParserDelegate.parseCustomElement(Element).

Parameters:
element - element to parse
idAttribute - attribute that carries the unique ID for the bean
parserContext - current parser context
Returns:
bean definition reference

parseCustomElementReference

public static RuntimeBeanReference parseCustomElementReference(Element element,
                                                               String refAttribute,
                                                               ParserContext parserContext)
Parses a custom element that is a reference to a bean declared elsewhere.

Parameters:
element - the element that references the bean
refAttribute - the name of the attribute that contains the referenced bean's name
parserContext - current parsing context
Returns:
reference to the bean or null if the element did not contain the reference attribute

parseCustomElements

public static ManagedList parseCustomElements(List<Element> elements,
                                              ParserContext parserContext)
Parse list of elements into bean definitions. The list is populated with bean references. Each configuration element is expected to contain an 'id' attribute that provides a unique ID for each bean.

Parameters:
elements - list of elements to parse
parserContext - current parsing context
Returns:
list of bean references

parseCustomElements

public static ManagedList parseCustomElements(List<Element> elements,
                                              String idAttribute,
                                              ParserContext parserContext)
Parse list of elements into bean definitions.

Parameters:
elements - list of elements to parse
idAttribute - attribute that carries the unique ID for the bean
parserContext - current parsing context
Returns:
list of bean references


Copyright © 2006-2009 Internet2. All Rights Reserved.