Class AbstractControllerConfig.FilterBuilder<T extends AppController>

java.lang.Object
org.javalite.activeweb.AbstractControllerConfig.FilterBuilder<T>
Enclosing class:
AbstractControllerConfig

public static class AbstractControllerConfig.FilterBuilder<T extends AppController> extends Object
  • Constructor Details

  • 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

      public void forActions(String... actionNames)
      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

      public void excludeActions(String... excludedActions)
      Excludes actions from filter configuration. Opposite of forActions(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.