Spring Social

org.springframework.social.config.xml
Class AbstractProviderConfigBeanDefinitionParser

java.lang.Object
  extended by org.springframework.social.config.support.ProviderConfigurationSupport
      extended by org.springframework.social.config.xml.AbstractProviderConfigBeanDefinitionParser
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser

public abstract class AbstractProviderConfigBeanDefinitionParser
extends ProviderConfigurationSupport
implements org.springframework.beans.factory.xml.BeanDefinitionParser

Abstract bean definition parser for configuring provider-specific beans in a Spring application context. Automatically creates a ConnectionFactoryLocator bean if none exists and registers the ConnectionFactory bean with the ConnectionFactoryLocator. Also creates a request-scoped API binding bean retrieved from the connection repository.

Author:
Craig Walls

Field Summary
 
Fields inherited from class org.springframework.social.config.support.ProviderConfigurationSupport
apiBindingType, apiHelperClass, authenticationServiceClass, connectionFactoryClass
 
Constructor Summary
protected AbstractProviderConfigBeanDefinitionParser(java.lang.Class<? extends ConnectionFactory<?>> connectionFactoryClass, java.lang.Class<? extends ApiHelper<?>> apiHelperClass)
          Constructs a connection factory-creating BeanDefinitionParser.
 
Method Summary
protected  java.lang.String getAppId(java.util.Map<java.lang.String,java.lang.Object> allAttributes)
           
protected  java.lang.String getAppSecret(java.util.Map<java.lang.String,java.lang.Object> allAttributes)
           
 org.springframework.beans.factory.config.BeanDefinition parse(org.w3c.dom.Element element, org.springframework.beans.factory.xml.ParserContext parserContext)
           
 
Methods inherited from class org.springframework.social.config.support.ProviderConfigurationSupport
getAuthenticationServiceBeanDefinition, getAuthenticationServiceClass, getConnectionFactoryBeanDefinition, isSocialSecurityAvailable, registerBeanDefinitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProviderConfigBeanDefinitionParser

protected AbstractProviderConfigBeanDefinitionParser(java.lang.Class<? extends ConnectionFactory<?>> connectionFactoryClass,
                                                     java.lang.Class<? extends ApiHelper<?>> apiHelperClass)
Constructs a connection factory-creating BeanDefinitionParser.

Parameters:
connectionFactoryClass - The type of ConnectionFactory to create. Must have a two-argument constructor taking an application's ID and secret as Strings.
Method Detail

parse

public org.springframework.beans.factory.config.BeanDefinition parse(org.w3c.dom.Element element,
                                                                     org.springframework.beans.factory.xml.ParserContext parserContext)
Specified by:
parse in interface org.springframework.beans.factory.xml.BeanDefinitionParser

getAppId

protected java.lang.String getAppId(java.util.Map<java.lang.String,java.lang.Object> allAttributes)
Specified by:
getAppId in class ProviderConfigurationSupport

getAppSecret

protected java.lang.String getAppSecret(java.util.Map<java.lang.String,java.lang.Object> allAttributes)
Specified by:
getAppSecret in class ProviderConfigurationSupport

Spring Social