Package org.togglz.spring.web
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 theFeaturesAreActiveannotation to determine if a controller should be activated or not.Set the togglz.web.register-feature-interceptor to
trueto activate this interceptor.- Author:
- ractive, m-schroeer
-
-
Constructor Summary
Constructors Constructor Description FeatureInterceptor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static Set<String>getFeatureNames(org.togglz.core.manager.FeatureManager featureManager)protected static <A extends Annotation>
AhandlerAnnotation(org.springframework.web.method.HandlerMethod handlerMethod, Class<A> annotationClass)booleanpreHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler)
-
-
-
Method Detail
-
preHandle
public boolean preHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler) throws Exception- Specified by:
preHandlein interfaceorg.springframework.web.servlet.HandlerInterceptor- Throws:
Exception
-
handlerAnnotation
protected static <A extends Annotation> A handlerAnnotation(org.springframework.web.method.HandlerMethod handlerMethod, Class<A> annotationClass)
-
-