com.github.dynamicextensionsalfresco.aop.DynamicExtensionsAdvisorAutoProxyCreator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annotations-runtime Show documentation
Show all versions of annotations-runtime Show documentation
Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features
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