public abstract class AbstractControllerConfig<T extends AppController> extends Object implements InitConfig
app.config.AppControllerConfig
.
This class provides ways to bind filters to controllers.
See HttpSupportFilter
.
Adding controller filters:add(org.javalite.activeweb.controller_filters.HttpSupportFilter...)
)}
Not specifying controllers in the to(...)
method adds filters to all controllers.
Filters' after() methods are executed in the opposite order as filters are registered.
Here is an example of adding a filter to specific actions:
add(mew TimingFilter(), new DBConnectionFilter()).to(PostsController.class).forActions("index", "show");
Modifier and Type | Class and Description |
---|---|
class |
AbstractControllerConfig.FilterBuilder |
Constructor and Description |
---|
AbstractControllerConfig() |
Modifier and Type | Method and Description |
---|---|
protected AbstractControllerConfig.FilterBuilder |
add(HttpSupportFilter... filters)
Adds a set of filters to a set of controllers.
|
void |
completeInit() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init
protected AbstractControllerConfig.FilterBuilder add(HttpSupportFilter... filters)
filters
- filters to be added.to()
method which accepts a controller class.public void completeInit()
completeInit
in interface InitConfig
Copyright © 2019 JavaLite. All rights reserved.