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

This code example shows how to use the following methods:setCacheOperationSource, setAdvice, setOrder
public class ProxyCachingConfiguration extends AbstractCachingConfiguration<CachingConfigurer> { 
 
	@Bean(name = CacheManagementConfigUtils.CACHE_ADVISOR_BEAN_NAME) 
	@Role(BeanDefinition.ROLE_INFRASTRUCTURE) 
	public BeanFactoryCacheOperationSourceAdvisor cacheAdvisor() { 
		BeanFactoryCacheOperationSourceAdvisor advisor = 
				new BeanFactoryCacheOperationSourceAdvisor(); 
		advisor.setCacheOperationSource(cacheOperationSource()); 
		advisor.setAdvice(cacheInterceptor()); 
		advisor.setOrder(this.enableCaching.<Integer>getNumber("order")); 
		return advisor; 
	} 
 
	@Bean 
	@Role(BeanDefinition.ROLE_INFRASTRUCTURE) 
	public CacheOperationSource cacheOperationSource() { 
		return new AnnotationCacheOperationSource(); 
	} 
 
	@Bean 
8
CodeRank
This code example shows how to use the following methods:
	/** 
	 * Create a new PersistenceExceptionTranslationAdvisor. 
	 * @param persistenceExceptionTranslator the PersistenceExceptionTranslator to use 
	 * @param repositoryAnnotationType the annotation type to check for 
	 */ 
	public PersistenceExceptionTranslationAdvisor( 
			PersistenceExceptionTranslator persistenceExceptionTranslator, 
			Class<? extends Annotation> repositoryAnnotationType) { 
 
		this.advice = new PersistenceExceptionTranslationInterceptor(persistenceExceptionTranslator); 
		this.pointcut = new AnnotationMatchingPointcut(repositoryAnnotationType, true); 
	} 
 
	/** 
	 * Create a new PersistenceExceptionTranslationAdvisor. 
	 * @param beanFactory the ListableBeanFactory to obtaining all 
	 * PersistenceExceptionTranslators from 
	 * @param repositoryAnnotationType the annotation type to check for 
	 */ 
	PersistenceExceptionTranslationAdvisor( 
6
CodeRank
This code example shows how to use the following methods:
	private TideDataPublishingInterceptor dataPublishingInterceptor; 
 
	private final TideDataPublishingPointcut pointcut = new TideDataPublishingPointcut(); 
 
 
	public TideDataPublishingAdvisor() { 
		pointcut.setClassFilter(new AnnotationClassFilter(DataEnabled.class)); 
	} 
 
	public TideDataPublishingAdvisor(TideDataPublishingInterceptor interceptor) { 
		setDataPublishingInterceptor(interceptor); 
	} 
 
	public void setDataPublishingInterceptor(TideDataPublishingInterceptor interceptor) { 
		this.dataPublishingInterceptor = interceptor; 
	} 
 
 
	public Advice getAdvice() { 
		return this.dataPublishingInterceptor; 
5
CodeRank
This code example shows how to use the following methods:
	private final Set<Class<? extends Annotation>> publisherAnnotationTypes; 
 
	private final MessagePublishingInterceptor interceptor; 
 
	@SuppressWarnings("unchecked") //For JDK7 
	public PublisherAnnotationAdvisor(Class<? extends Annotation> ... publisherAnnotationTypes) { 
		this.publisherAnnotationTypes = new HashSet<Class<? extends Annotation>>(Arrays.asList(publisherAnnotationTypes)); 
		PublisherMetadataSource metadataSource = new MethodAnnotationPublisherMetadataSource(this.publisherAnnotationTypes); 
		this.interceptor = new MessagePublishingInterceptor(metadataSource); 
	} 
 
	@SuppressWarnings("unchecked") 
	public PublisherAnnotationAdvisor() { 
		this(Publisher.class); 
	} 
 
 
	/** 
	 * @deprecated Use {@link #setDefaultChannelName(String)}. 
	 * @param defaultChannel the default channel. 
4
CodeRank