All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dynamicextensionsalfresco.aop.DynamicExtensionsAdvisorAutoProxyCreator Maven / Gradle / Ivy

Go to download

Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features

There is a newer version: 3.1.0
Show newest version
package com.github.dynamicextensionsalfresco.aop;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.springframework.aop.Advisor;
import org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator;

/**
 * Creates proxies for using {@link Advisor}s that are marked as {@link DynamicExtensionsAdvisor}s.
 * 
 * @author Laurens Fridael
 * 
 */
@SuppressWarnings("serial")
public class DynamicExtensionsAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator {

	/* Main operations */

	/**
	 * Obtains {@link Advisor}s that implement {@link DynamicExtensionsAdvisor}.
	 */
	@Override
	protected List findCandidateAdvisors() {
		final List advisors = new ArrayList(super.findCandidateAdvisors());
		for (final Iterator it = advisors.iterator(); it.hasNext();) {
			final Advisor advisor = it.next();
			if (!(advisor instanceof DynamicExtensionsAdvisor)) {
				it.remove();
			}
		}
		return advisors;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy