Class DefaultInterceptorRegistry

  • All Implemented Interfaces:
    InterceptorRegistry

    public class DefaultInterceptorRegistry
    extends java.lang.Object
    implements InterceptorRegistry
    Provides type interceptors based upon jalo types.
    • Constructor Detail

      • DefaultInterceptorRegistry

        public DefaultInterceptorRegistry()
    • Method Detail

      • registerInterceptor

        public void registerInterceptor​(java.lang.String type,
                                        Interceptor interceptor,
                                        java.util.Collection<Interceptor> replacements)
        Register a given Interceptor to the registry. This Interceptor is registered for the given type (and every subtype) and replaces (if provided) the Interceptors in the given replacements collection. If possible use registerInterceptor(InterceptorMapping) instead!
        Parameters:
        type - for this ComposedType code (and any subtype) the Interceptor is registered.
        interceptor - the Interceptor
        replacements - the given Interceptor replaces the Interceptors in this collection. Example: a LoadInterceptor for product replaces the LoadInterceptor for items because the productt load interceptor does a special product loading
      • unregisterInterceptor

        public void unregisterInterceptor​(InterceptorMapping mapping)
      • init

        protected void init()
      • addTypeInvalidationListener

        protected void addTypeInvalidationListener()
        Adds the composed type invalidation listener to the pool.
      • getAssignableTypes

        protected java.util.List<java.lang.String> getAssignableTypes​(java.lang.String type)
        Returns all assignable types for a given type in super-type-first order. All type codes are lower case!
      • setInterceptorMappings

        public void setInterceptorMappings​(java.util.Collection<InterceptorMapping> configuredMappings)
      • assertLoaded

        protected void assertLoaded()
        DOCTODO apidoc
      • isValidTypeCode

        protected boolean isValidTypeCode​(java.lang.String code)
        Returns true if the given composed type code is part of the type system
        Parameters:
        code - the ComposedType code
        Returns:
        false otherwise
      • setInterceptorExecutionPolicy

        public void setInterceptorExecutionPolicy​(InterceptorExecutionPolicy interceptorExecutionPolicy)
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)