Spring Framework AnnotationAttributes - 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 AnnotationAttributes class.

This code example shows how to use the following methods:put
This code example shows how to use the following methods:getString
	@Override 
	public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
 
		AnnotationAttributes attributes = config.getAttributes();
 
		builder.addPropertyReference("neo4jTemplate", attributes.getString(ANN_NEO4J_TEMPLATE_REF));
		builder.addPropertyReference("neo4jMappingContext", DEFAULT_NEO4J_MAPPING_CONTEXT_REF);
	} 
 
	/* 
	 * (non-Javadoc) 
	 * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.data.repository.config.XmlRepositoryConfigurationSource) 
	 */ 
	@Override 
	public void postProcess(BeanDefinitionBuilder builder, XmlRepositoryConfigurationSource config) {
 
		Element element = config.getElement();
 
		String templateRef = element.getAttribute(NEO4J_TEMPLATE_REF);
		templateRef = StringUtils.hasText(templateRef) ? templateRef : DEFAULT_NEO4J_TEMPLATE_REF;
5
CodeRank
This code example shows how to use the following methods:getEnum
 
	@Bean(name = MBEAN_EXPORTER_NAME)
	@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
	public IntegrationMBeanExporter mbeanExporter() { 
		IntegrationMBeanExporter exporter = new IntegrationMBeanExporter();
		exporter.setRegistrationPolicy(this.attributes.<RegistrationPolicy>getEnum("registration"));
		setupDomain(exporter);
		setupServer(exporter);
		setupComponentNamePatterns(exporter);
		return exporter;
	} 
 
	private void setupDomain(IntegrationMBeanExporter exporter) {
		String defaultDomain = this.attributes.getString("defaultDomain");
		if (defaultDomain != null && this.environment != null) {
			defaultDomain = this.environment.resolvePlaceholders(defaultDomain);
		} 
		if (StringUtils.hasText(defaultDomain)) {
			exporter.setDefaultDomain(defaultDomain);
		} 
5
CodeRank
This code example shows how to use the following methods:getString
	 * (non-Javadoc) 
	 * @see org.springframework.data.auditing.config.AuditingConfiguration#getDateTimeProviderRef() 
	 */ 
	@Override 
	public String getDateTimeProviderRef() {
		return attributes.getString("dateTimeProviderRef");
	} 
 
	/*  
	 * (non-Javadoc) 
	 * @see org.springframework.data.auditing.config.AuditingConfiguration#isModifyOnCreate() 
	 */ 
	@Override 
	public boolean isModifyOnCreate() { 
		return attributes.getBoolean("modifyOnCreate");
	} 
} 
5
CodeRank
This code example shows how to use the following methods:getBoolean, getString
			} 
 
			String transactionManagerName; 
			boolean defaultRollback; 
			if (annAttrs != null) { 
				transactionManagerName = annAttrs.getString("transactionManager"); 
				defaultRollback = annAttrs.getBoolean("defaultRollback"); 
			} 
			else { 
				transactionManagerName = DEFAULT_TRANSACTION_MANAGER_NAME; 
				defaultRollback = DEFAULT_DEFAULT_ROLLBACK; 
			} 
 
			TransactionConfigurationAttributes configAttributes = new TransactionConfigurationAttributes( 
				transactionManagerName, defaultRollback); 
			if (logger.isDebugEnabled()) { 
				logger.debug(String.format("Retrieved TransactionConfigurationAttributes %s for class [%s].", 
					configAttributes, clazz)); 
			} 
			this.configurationAttributes = configAttributes; 
5
CodeRank
This code example shows how to use the following methods:getString
 
    @Override 
    public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
        AnnotationAttributes attributes = config.getAttributes();
 
        builder.addPropertyReference("ldapOperations", attributes.getString("ldapTemplateRef"));
    } 
} 
4
CodeRank
This code example shows how to use the following methods:getString
	 */ 
	@Override 
	public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
 
		AnnotationAttributes attributes = config.getAttributes();
		builder.addPropertyReference("elasticsearchOperations", attributes.getString("elasticsearchTemplateRef"));
	} 
 
	/*  
	 * (non-Javadoc) 
	 * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.data.repository.config.XmlRepositoryConfigurationSource) 
	 */ 
	@Override 
	public void postProcess(BeanDefinitionBuilder builder, XmlRepositoryConfigurationSource config) {
 
		Element element = config.getElement();
		builder.addPropertyReference("elasticsearchOperations", element.getAttribute("elasticsearch-template-ref"));
	} 
} 
3
CodeRank
This code example shows how to use the following methods:getString
  } 
 
  @Override 
  public void postProcess(final BeanDefinitionBuilder builder, final AnnotationRepositoryConfigurationSource config) {
    AnnotationAttributes attributes = config.getAttributes();
    builder.addPropertyReference("couchbaseOperations", attributes.getString("couchbaseTemplateRef"));
  } 
} 
4
CodeRank
This code example shows how to use the following methods:getBoolean, getString
	@Override 
	public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
 
		AnnotationAttributes attributes = config.getAttributes();
 
		builder.addPropertyReference("mongoOperations", attributes.getString("mongoTemplateRef"));
		builder.addPropertyValue("createIndexesForQueryMethods", attributes.getBoolean("createIndexesForQueryMethods"));
	} 
 
	/*  
	 * (non-Javadoc) 
	 * @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#registerBeansForRoot(org.springframework.beans.factory.support.BeanDefinitionRegistry, org.springframework.data.repository.config.RepositoryConfigurationSource) 
	 */ 
	@Override 
	public void registerBeansForRoot(BeanDefinitionRegistry registry, RepositoryConfigurationSource configurationSource) {
 
		super.registerBeansForRoot(registry, configurationSource);
 
		if (!registry.containsBeanDefinition(BeanNames.MAPPING_CONTEXT_BEAN_NAME)) {
 
4
CodeRank