Spring Data Couchbase

org.springframework.data.couchbase.config
Class CouchbaseTemplateParser

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.CouchbaseTemplateParser
All Implemented Interfaces:
BeanDefinitionParser

public class CouchbaseTemplateParser
extends AbstractSingleBeanDefinitionParser

Parser for "" bean definitions.

The outcome of this bean definition parser will be a constructed CouchbaseTemplate.

Author:
Michael Nitschinger

Field Summary
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
 
Constructor Summary
CouchbaseTemplateParser()
           
 
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

CouchbaseTemplateParser

public CouchbaseTemplateParser()
Method Detail

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.

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.

Spring Data Couchbase

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