Spring Data Couchbase

org.springframework.data.couchbase.config
Class CouchbaseTranslationServiceParser

java.lang.Object
  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      extended by org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
          extended by org.springframework.data.couchbase.config.CouchbaseTranslationServiceParser
All Implemented Interfaces:
BeanDefinitionParser

public class CouchbaseTranslationServiceParser
extends AbstractSingleBeanDefinitionParser

Enables Parsing of the "" configuration bean.

Author:
David Harrigan

Field Summary
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
 
Constructor Summary
CouchbaseTranslationServiceParser()
           
 
Method Summary
protected  void doParse(Element element, BeanDefinitionBuilder bean)
          Parse the bean definition and build up the bean.
protected  Class getBeanClass(Element element)
          Defines the bean class that will be constructed.
protected  String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext)
          Resolve the bean ID and assign a default if not set.
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, getBeanClassName, getParentName, parseInternal
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CouchbaseTranslationServiceParser

public CouchbaseTranslationServiceParser()
Method Detail

getBeanClass

protected Class getBeanClass(Element element)
Defines the bean class that will be constructed.

Overrides:
getBeanClass in class AbstractSingleBeanDefinitionParser
Parameters:
element - the XML element which contains the attributes.
Returns:
the class type to instantiate.

doParse

protected void doParse(Element element,
                       BeanDefinitionBuilder bean)
Parse the bean definition and build up the bean.

Overrides:
doParse in class AbstractSingleBeanDefinitionParser
Parameters:
element - the XML element which contains the attributes.
bean - the builder which builds the bean.

resolveId

protected String resolveId(Element element,
                           AbstractBeanDefinition definition,
                           ParserContext parserContext)
Resolve the bean ID and assign a default if not set.

Overrides:
resolveId in class AbstractBeanDefinitionParser
Parameters:
element - the XML element which contains the attributes.
definition - the bean definition to work with.
parserContext - encapsulates the parsing state and configuration.
Returns:
the ID to work with (e.g., "translationService")

Spring Data Couchbase

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.