GWTP Dispatch Server Base 0.7-redhat-1

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) 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.
 

Method Detail

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

GWTP Dispatch Server Base 0.7-redhat-1

Copyright © 2010-2013 JBoss by Red Hat. All Rights Reserved.