Package ome.logic

Class HardWiredInterceptor

  • All Implemented Interfaces:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
    Direct Known Subclasses:
    BasicSecurityWiring

    public abstract class HardWiredInterceptor
    extends java.lang.Object
    implements org.aopalliance.intercept.MethodInterceptor
    Extension point for interceptors which should be compiled in from third-party code. Subclasses can be added to the build system via the omero.hard-wired.interceptors property value. All subclasses must have a no-arg constructor, but can assess various environment variables via the getters defined on this class.
    Since:
    3.0-Beta1
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.aopalliance.intercept.MethodInterceptor

        invoke
    • Constructor Detail

      • HardWiredInterceptor

        public HardWiredInterceptor()
    • Method Detail

      • configure

        public static void configure​(java.util.List<HardWiredInterceptor> hwi,
                                     ome.system.OmeroContext ctx)
      • selfConfigure

        public void selfConfigure​(ome.system.OmeroContext context)
        Calls OmeroContext.applyBeanPropertyValues(Object, String) to have properties injected.
      • initializeUserAttributes

        public 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
      • getServiceFactory

        protected ome.system.ServiceFactory getServiceFactory​(org.aopalliance.intercept.MethodInvocation mi)
      • getPrincipal

        protected ome.system.Principal getPrincipal​(org.aopalliance.intercept.MethodInvocation mi)
      • hasPassword

        protected boolean hasPassword​(org.aopalliance.intercept.MethodInvocation mi)