org.mentawai.coc
Class InnerActionConsequenceProvider

java.lang.Object
  extended by org.mentawai.coc.InnerActionConsequenceProvider
All Implemented Interfaces:
ConsequenceProvider

public class InnerActionConsequenceProvider
extends Object
implements ConsequenceProvider


Constructor Summary
InnerActionConsequenceProvider()
           
 
Method Summary
 Consequence getConsequence(String action, Class<? extends Object> actionClass, String result, String innerAction)
          Creates a consequence based on a convention, using the name of the executed action, the result of the action's execution and the executed inner action.
protected  String getDir(String actionName)
          This method will imply a directory name from the action name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InnerActionConsequenceProvider

public InnerActionConsequenceProvider()
Method Detail

getDir

protected String getDir(String actionName)
This method will imply a directory name from the action name. Ex: Action = HelloWorldAction Directory = /helloworld

Parameters:
actionName - The action class name
Returns:
a directory where to look for JSPs

getConsequence

public Consequence getConsequence(String action,
                                  Class<? extends Object> actionClass,
                                  String result,
                                  String innerAction)
Description copied from interface: ConsequenceProvider
Creates a consequence based on a convention, using the name of the executed action, the result of the action's execution and the executed inner action.

Specified by:
getConsequence in interface ConsequenceProvider
Parameters:
action - the name of the action
actionClass - the class representing the action
result - the result of the actions execution.
innerAction - the inner action called or null if the execute() method was called.
Returns:
the Consequence created by convention.


Copyright © 2013. All Rights Reserved.