public abstract class HardWiredInterceptor
extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor
Constructor and Description |
---|
HardWiredInterceptor() |
Modifier and Type | Method and Description |
---|---|
static void |
configure(java.util.List<HardWiredInterceptor> hwi,
ome.system.OmeroContext ctx) |
java.lang.String |
getName()
Can be implemented by all subclasses, so that they can configure themselves
in
selfConfigure(OmeroContext) . |
protected ome.system.Principal |
getPrincipal(org.aopalliance.intercept.MethodInvocation mi) |
protected ome.system.ServiceFactory |
getServiceFactory(org.aopalliance.intercept.MethodInvocation mi) |
protected boolean |
hasPassword(org.aopalliance.intercept.MethodInvocation mi) |
static void |
initializeUserAttributes(org.aopalliance.intercept.MethodInvocation mi,
ome.system.ServiceFactory sf,
ome.system.Principal pr,
java.util.concurrent.atomic.AtomicBoolean reusedSession)
Adds the given environment context objects to the
ReflectiveMethodInvocation.getUserAttributes()
Map for lookup in subclasses |
static java.util.List<HardWiredInterceptor> |
parse(java.lang.String[] classNames)
Produces a
List of instantiated interceptors from
a list of HardWiredInterceptor subclass names. |
void |
selfConfigure(ome.system.OmeroContext context)
Calls
OmeroContext.applyBeanPropertyValues(Object, String) to
have properties injected. |
public static void configure(java.util.List<HardWiredInterceptor> hwi, ome.system.OmeroContext ctx)
public java.lang.String getName()
selfConfigure(OmeroContext)
. If the method returns null,
selfConfigure(OmeroContext)
will not run.public void selfConfigure(ome.system.OmeroContext context)
OmeroContext.applyBeanPropertyValues(Object, String)
to
have properties injected.public static java.util.List<HardWiredInterceptor> parse(java.lang.String[] classNames)
List
of instantiated interceptors from
a list of HardWiredInterceptor
subclass names.public static void initializeUserAttributes(org.aopalliance.intercept.MethodInvocation mi, ome.system.ServiceFactory sf, ome.system.Principal pr, java.util.concurrent.atomic.AtomicBoolean reusedSession)
ReflectiveMethodInvocation.getUserAttributes()
Map
for lookup in subclassesprotected ome.system.ServiceFactory getServiceFactory(org.aopalliance.intercept.MethodInvocation mi)
protected ome.system.Principal getPrincipal(org.aopalliance.intercept.MethodInvocation mi)
protected boolean hasPassword(org.aopalliance.intercept.MethodInvocation mi)