public class AbstractControllerConfig.FilterBuilder extends Object
Modifier | Constructor and Description |
---|---|
protected |
FilterBuilder(HttpSupportFilter[] filters) |
Modifier and Type | Method and Description |
---|---|
void |
exceptFor(Class<T>... 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.
|
AbstractControllerConfig.FilterBuilder |
to(Class<? extends AppController>... controllerClasses)
Provides a list of controllers to which filters are added.
|
protected FilterBuilder(HttpSupportFilter[] filters)
public AbstractControllerConfig.FilterBuilder to(Class<? extends AppController>... controllerClasses)
controllerClasses
- list of controller classes to which filters are added.forActions(String...)
.public void forActions(String... actionNames)
Example:
add(mew TimingFilter(), new DBConnectionFilter()).to(PostsController.class).forActions("index", "show");
actionNames
- list of action names for which filters are configured.public void excludeActions(String... excludedActions)
forActions(String...)
.excludedActions
- list of actions for which this filter will not apply.@SafeVarargs public final void exceptFor(Class<T>... excludeControllerClasses)
excludeControllerClasses
- list of controllers to which these filters do not apply.Copyright © 2020 JavaLite. All rights reserved.