org.infoglue.cms.applications.common.actions
Class WebworkAbstractAction

java.lang.Object
  extended by org.infoglue.cms.applications.common.actions.WebworkAbstractAction
All Implemented Interfaces:
java.io.Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.ServletRequestAware, webwork.action.ServletResponseAware
Direct Known Subclasses:
InfoGlueAbstractAction

public abstract class WebworkAbstractAction
extends java.lang.Object
implements webwork.action.Action, webwork.action.ServletRequestAware, webwork.action.ServletResponseAware, webwork.action.CommandDriven

Author:
Mattias Bogeblad, Frank Febbraro (frank@phase2technology.com)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
WebworkAbstractAction()
           
 
Method Summary
 java.lang.String doDefault()
           
protected abstract  java.lang.String doExecute()
          Subclasses implement this
 java.lang.String execute()
           
 BrowserBean getBrowserBean()
           
 java.lang.String getCurrentUrl()
          This method returns the url to the current page.
 Error getError()
           
 Errors getErrors()
           
protected  javax.servlet.http.HttpSession getHttpSession()
          Returns the HttpSession TODO: Hide the implementation behind WebWorks abstractions in ActionContext
 InfoGluePrincipal getInfoGluePrincipal()
          This method returns a logged in principal if existing.
 java.lang.String getLocalizedString(java.util.Locale locale, java.lang.String key)
           
protected  javax.servlet.http.HttpServletRequest getRequest()
          Returns the HttpServletRequest TODO: Hide the implementation behind WebWorks abstractions in ActionContext
protected  javax.servlet.http.HttpServletResponse getResponse()
          Returns the HttpServletResponse TODO: Hide the implementation behind WebWorks abstractions in ActionContext
 java.lang.String getRoot()
           
 Session getSession()
          Use the ActionContext to initialize the Session and remove the dependence on HTTP and the Servlet Spec.
 void setCommand(java.lang.String commandName)
           
 void setError(java.lang.Throwable throwable, java.lang.Throwable cause)
           
 void setServletRequest(javax.servlet.http.HttpServletRequest request)
           
 void setServletResponse(javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebworkAbstractAction

public WebworkAbstractAction()
Method Detail

getError

public Error getError()

getErrors

public Errors getErrors()

doDefault

public java.lang.String doDefault()
                           throws java.lang.Exception
Throws:
java.lang.Exception

execute

public java.lang.String execute()
                         throws java.lang.Exception
Specified by:
execute in interface webwork.action.Action
Throws:
java.lang.Exception

getCurrentUrl

public java.lang.String getCurrentUrl()
                               throws java.lang.Exception
This method returns the url to the current page. Could be used in case of reload for example or for logging reasons.

Throws:
java.lang.Exception

setCommand

public void setCommand(java.lang.String commandName)
Specified by:
setCommand in interface webwork.action.CommandDriven

setServletRequest

public void setServletRequest(javax.servlet.http.HttpServletRequest request)
Specified by:
setServletRequest in interface webwork.action.ServletRequestAware

setServletResponse

public void setServletResponse(javax.servlet.http.HttpServletResponse response)
Specified by:
setServletResponse in interface webwork.action.ServletResponseAware

setError

public void setError(java.lang.Throwable throwable,
                     java.lang.Throwable cause)

getLocalizedString

public java.lang.String getLocalizedString(java.util.Locale locale,
                                           java.lang.String key)

getRoot

public final java.lang.String getRoot()

getInfoGluePrincipal

public final InfoGluePrincipal getInfoGluePrincipal()
This method returns a logged in principal if existing.


doExecute

protected abstract java.lang.String doExecute()
                                       throws java.lang.Exception
Subclasses implement this

Throws:
java.lang.Exception

getBrowserBean

public final BrowserBean getBrowserBean()

getRequest

protected final javax.servlet.http.HttpServletRequest getRequest()
Returns the HttpServletRequest TODO: Hide the implementation behind WebWorks abstractions in ActionContext


getResponse

protected final javax.servlet.http.HttpServletResponse getResponse()
Returns the HttpServletResponse TODO: Hide the implementation behind WebWorks abstractions in ActionContext


getHttpSession

protected final javax.servlet.http.HttpSession getHttpSession()
Returns the HttpSession TODO: Hide the implementation behind WebWorks abstractions in ActionContext


getSession

public final Session getSession()
Use the ActionContext to initialize the Session and remove the dependence on HTTP and the Servlet Spec. Makes it much easier for testing.



Copyright © 2005 InfoGlue.org All Rights Reserved.