Class FeatureInterceptor

java.lang.Object
org.togglz.spring.web.FeatureInterceptor
All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor

public class FeatureInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor
This interceptor checks if a controller or controller method is annotated with the FeaturesAreActive annotation to determine if a controller should be activated or not.

Set the togglz.web.register-feature-interceptor to true to activate this interceptor.

Author:
ractive, m-schroeer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static Set<String>
    getFeatureNames(org.togglz.core.manager.FeatureManager featureManager)
     
    protected static <A extends Annotation>
    A
    handlerAnnotation(org.springframework.web.method.HandlerMethod handlerMethod, Class<A> annotationClass)
     
    boolean
    preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.web.servlet.HandlerInterceptor

    afterCompletion, postHandle
  • Constructor Details

    • FeatureInterceptor

      public FeatureInterceptor()
  • Method Details

    • preHandle

      public boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) throws Exception
      Specified by:
      preHandle in interface org.springframework.web.servlet.HandlerInterceptor
      Throws:
      Exception
    • handlerAnnotation

      protected static <A extends Annotation> A handlerAnnotation(org.springframework.web.method.HandlerMethod handlerMethod, Class<A> annotationClass)
    • getFeatureNames

      protected static Set<String> getFeatureNames(org.togglz.core.manager.FeatureManager featureManager)