Spring Framework AbstractSingleBeanDefinitionParser - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AbstractSingleBeanDefinitionParser class.

This code example shows how to use the following methods:
 * Parser for the 'scheduler' element of the 'task' namespace. 
 * 
 * @author Mark Fisher 
 * @since 3.0 
 */ 
public class SchedulerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected String getBeanClassName(Element element) {
		return "org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler"; 
	} 
 
	@Override 
	protected void doParse(Element element, BeanDefinitionBuilder builder) {
		String poolSize = element.getAttribute("pool-size");
		if (StringUtils.hasText(poolSize)) {
			builder.addPropertyValue("poolSize", poolSize);
		} 
	} 
 
9
CodeRank
This code example shows how to use the following methods:
 * Parser for the {@code <oxm:xmlbeans-marshaller/>} element. 
 * 
 * @author Arjen Poutsma 
 * @since 3.0 
 */ 
class XmlBeansMarshallerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected String getBeanClassName(Element element) {
		return "org.springframework.oxm.xmlbeans.XmlBeansMarshaller"; 
	} 
 
	@Override 
	protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder beanDefinitionBuilder) {
		String optionsName = element.getAttribute("options");
		if (StringUtils.hasText(optionsName)) {
			beanDefinitionBuilder.addPropertyReference("xmlOptions", optionsName);
		} 
	} 
 
9
CodeRank
This code example shows how to use the following methods:
 * @author Christian Dupuis 
 * @since 2.5 
 * @see org.springframework.transaction.jta.WebLogicJtaTransactionManager 
 * @see org.springframework.transaction.jta.WebSphereUowTransactionManager 
 */ 
public class JtaTransactionManagerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser  { 
 
	@Override 
	protected String getBeanClassName(Element element) { 
		return JtaTransactionManagerFactoryBean.resolveJtaTransactionManagerClassName(); 
	} 
 
	@Override 
	protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) { 
		return TxNamespaceHandler.DEFAULT_TRANSACTION_MANAGER_BEAN_NAME; 
	} 
 
} 
9
CodeRank
This code example shows how to use the following methods:
 * Parser for the {@code <oxm:jaxb2-marshaller/>} element. 
 * 
 * @author Arjen Poutsma 
 * @since 3.0 
 */ 
class Jaxb2MarshallerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected String getBeanClassName(Element element) {
		return "org.springframework.oxm.jaxb.Jaxb2Marshaller"; 
	} 
 
	@Override 
	protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder beanDefinitionBuilder) {
		String contextPath = element.getAttribute("context-path");
		if (!StringUtils.hasText(contextPath)) {
			// Backwards compatibility with 3.x version of the xsd 
			contextPath = element.getAttribute("contextPath");
		} 
		if (StringUtils.hasText(contextPath)) {
9
CodeRank
This code example shows how to use the following methods:
 * @author Juergen Hoeller 
 * @author Arjen Poutsma 
 * @author Dave Syer 
 * @since 2.5.2 
 */ 
abstract class AbstractPropertyLoadingBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected boolean shouldGenerateId() { 
		return true; 
	} 
 
	@Override 
	protected void doParse(Element element, BeanDefinitionBuilder builder) {
		String location = element.getAttribute("location");
		if (StringUtils.hasLength(location)) {
			String[] locations = StringUtils.commaDelimitedListToStringArray(location);
			builder.addPropertyValue("locations", locations);
		} 
 
9
CodeRank
This code example shows how to use the following methods:
 * 
 * @author Mark Fisher 
 * @author Juergen Hoeller 
 * @since 3.0 
 */ 
public class ExecutorBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected String getBeanClassName(Element element) {
		return "org.springframework.scheduling.config.TaskExecutorFactoryBean"; 
	} 
 
	@Override 
	protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
		String keepAliveSeconds = element.getAttribute("keep-alive");
		if (StringUtils.hasText(keepAliveSeconds)) {
			builder.addPropertyValue("keepAliveSeconds", keepAliveSeconds);
		} 
		String queueCapacity = element.getAttribute("queue-capacity");
		if (StringUtils.hasText(queueCapacity)) {
9
CodeRank
This code example shows how to use the following methods:
 * Parser for the &lt;context:load-time-weaver/&gt; element. 
 * 
 * @author Juergen Hoeller 
 * @since 2.5 
 */ 
class LoadTimeWeaverBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
	private static final String WEAVER_CLASS_ATTRIBUTE = "weaver-class";
 
	private static final String ASPECTJ_WEAVING_ATTRIBUTE = "aspectj-weaving";
 
	private static final String DEFAULT_LOAD_TIME_WEAVER_CLASS_NAME =
			"org.springframework.context.weaving.DefaultContextLoadTimeWeaver"; 
 
	private static final String ASPECTJ_WEAVING_ENABLER_CLASS_NAME =
			"org.springframework.context.weaving.AspectJWeavingEnabler"; 
 
 
	@Override 
	protected String getBeanClassName(Element element) {
9
CodeRank
This code example shows how to use the following methods:
 
/** 
 * @author Ryan Heaton 
 * @author Dave Syer 
 */ 
public class WebExpressionHandlerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser { 
 
	@Override 
	protected Class<?> getBeanClass(Element element) { 
		return OAuth2WebSecurityExpressionHandler.class; 
	} 
 
} 
9
CodeRank
This code example shows how to use the following methods:
 
/** 
 * @author Ryan Heaton 
 * @author Dave Syer 
 */ 
public class ExpressionHandlerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser { 
 
  @Override 
  protected Class getBeanClass(Element element) { 
    return OAuthMethodSecurityExpressionHandler.class; 
  } 
 
} 
9
CodeRank
This code example shows how to use the following methods:
 
/** 
 * @author Ryan Heaton 
 * @author Dave Syer 
 */ 
public class ExpressionHandlerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser { 
 
	@Override 
	protected Class<?> getBeanClass(Element element) { 
		return OAuth2MethodSecurityExpressionHandler.class; 
	} 
 
} 
9
CodeRank