com.github.dynamicextensionsalfresco.aop.RunAsSystemAdvice 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.lang.reflect.InvocationTargetException;
import com.github.dynamicextensionsalfresco.annotations.RunAs;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
/**
* Provides advice for {@link RunAs}-annotated methods.
*
* This implementation invokes {@link RunAs} operations within a {@link RunAsWork} callback.
*/
public class RunAsSystemAdvice implements MethodInterceptor {
@Override
public Object invoke(final MethodInvocation invocation) throws Throwable {
return AuthenticationUtil.runAs(new RunAsWork
© 2015 - 2025 Weber Informatics LLC | Privacy Policy