com.gwtplatform.dispatch.server.actionvalidator
Interface ActionValidator
- All Known Implementing Classes:
- AbstractDefaultActionValidator
public interface ActionValidator
Implementors must provide an implementation of this interface and provide it
to the DispatchService
implementation so that it can check whether or
not the action can be executed. Doing so will often requiring session
information, which can be done by injecting a Provider<HttpSession>
into the validator and calling httpSessionProvider.get()
within the
isValid(com.gwtplatform.dispatch.shared.Action extends com.gwtplatform.dispatch.shared.Result>)
method.
You should think of annotating your validators with @RequestScoped
or
@Singleton
.
- Author:
- David Peterson, Christian Goudreau
Method Summary |
boolean |
isValid(Action<? extends Result> action)
Validate whether or not that Action can be executed at this time. |
isValid
boolean isValid(Action<? extends Result> action)
throws ActionException
- Validate whether or not that
Action
can be executed at this time.
You can also throw an ActionException
if you want to fine grain why
the validator failed.
- Parameters:
action
- The action that called this validator.
- Returns:
true
if the action can be executed, false
otherwise.
- Throws:
ActionException
Copyright © 2010-2012 ArcBees. All Rights Reserved.