001    package hirondelle.web4j.action;
002    
003    import hirondelle.web4j.model.AppException;
004    
005    /**
006     <span class="highlight">
007     Process an HTTP request, and return a {@link ResponsePage}.
008     </span>
009    
010     <P><b>This interface is likely the most important 
011     abstraction in WEB4J.</b> Almost every feature implemented by the programmer will 
012     need an implementation of this interface. 
013     
014     <P>Typically, one of the <em>ActionXXX</em> abstract base classes are used to 
015     build implementations of this interface.
016    */
017    public interface Action {
018      
019      /**
020      Execute desired operation.
021       
022      <P>Typical operations include : 
023      <ul>
024      <li>validate user input
025      <li>interact with the database 
026      <li>place required objects in the appropriate scope
027      <li>set the appropriate {@link ResponsePage}.
028      </ul>
029      
030      <P>Returns an identifier for the resource (for example a JSP) which 
031      will display the end result of this <tt>Action</tt> (using either a 
032      forward or a redirect).
033      */
034      ResponsePage execute() throws AppException;
035      
036    }