Package org.javalite.activeweb
Class AbstractControllerConfig.FilterBuilder<T extends AppController>
java.lang.Object
org.javalite.activeweb.AbstractControllerConfig.FilterBuilder<T>
- Enclosing class:
- AbstractControllerConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
exceptFor(Class<? extends AppController>... excludeControllerClasses)
Pass controllers to this method if you want to exclude supplied filters to be applied to them.void
excludeActions(String... excludedActions)
Excludes actions from filter configuration.void
forActions(String... actionNames)
Adds a list of actions for which filters are configured.to(Class<? extends AppController>... controllerClasses)
Provides a list of controllers to which filters are added.
-
Constructor Details
-
FilterBuilder
-
-
Method Details
-
to
@SafeVarargs public final AbstractControllerConfig.FilterBuilder<T> to(Class<? extends AppController>... controllerClasses)Provides a list of controllers to which filters are added.- Parameters:
controllerClasses
- list of controller classes to which filters are added.- Returns:
- self, usually to run a method
forActions(String...)
.
-
forActions
Adds a list of actions for which filters are configured.Example:
add(mew TimingFilter(), new DBConnectionFilter()).to(PostsController.class).forActions("index", "show");
- Parameters:
actionNames
- list of action names for which filters are configured.
-
excludeActions
Excludes actions from filter configuration. Opposite offorActions(String...)
.- Parameters:
excludedActions
- list of actions for which this filter will not apply.
-
exceptFor
@SafeVarargs public final void exceptFor(Class<? extends AppController>... excludeControllerClasses)Pass controllers to this method if you want to exclude supplied filters to be applied to them.- Parameters:
excludeControllerClasses
- list of controllers to which these filters do not apply.
-