net.sf.jportlet.impl
Class ActionEventImpl

java.lang.Object
  |
  +--net.sf.jportlet.impl.EventImpl
        |
        +--net.sf.jportlet.impl.ActionEventImpl
All Implemented Interfaces:
ActionEvent, Event

public class ActionEventImpl
extends EventImpl
implements ActionEvent

Implementation of ActionEvent

Author:
Herve Tchepannou

Field Summary
 
Fields inherited from class net.sf.jportlet.impl.EventImpl
_request, _response
 
Fields inherited from interface net.sf.jportlet.portlet.event.ActionEvent
ACTION_CONFIGURE, ACTION_EDIT, ACTION_HELP, ACTION_VIEW, RETURN_ERROR, RETURN_INPUT, RETURN_SUCCESS
 
Constructor Summary
ActionEventImpl(java.lang.String action, net.sf.jportlet.impl.PortletRequestImpl request, net.sf.jportlet.impl.PortletResponseImpl response)
           
 
Method Summary
 void addError(java.lang.Object error)
          Add an error.
 java.lang.String getAction()
          Returns the action that this action event carries.
 net.sf.jportlet.portlet.PortletURI getNextURI()
          Return the URI where to move after the action is executed.
 java.lang.String getReturnCode()
          Returns the returnCode.
 boolean hasErrors()
          Return true if the action has errors
 void setNextURI(net.sf.jportlet.portlet.PortletURI nextURI)
          Set the URI where to move after the action is executed
 void setReturnCode(java.lang.String returnCode)
          Set the returnCode.
 
Methods inherited from class net.sf.jportlet.impl.EventImpl
getPortlet, getPortletRequest, getPortletResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jportlet.portlet.event.Event
getPortlet, getPortletRequest, getPortletResponse
 

Constructor Detail

ActionEventImpl

public ActionEventImpl(java.lang.String action,
                       net.sf.jportlet.impl.PortletRequestImpl request,
                       net.sf.jportlet.impl.PortletResponseImpl response)
Method Detail

getAction

public java.lang.String getAction()
Description copied from interface: ActionEvent
Returns the action that this action event carries. The action value is either ActionEvent.ACTION_VIEW or ActionEvent.ACTION_EDIT or ActionEvent.ACTION_CONFIGURE or ActionEvent.ACTION_HELP

Specified by:
getAction in interface ActionEvent
Returns:
PortletAction
See Also:
ActionEvent.getAction()

getReturnCode

public java.lang.String getReturnCode()
Description copied from interface: ActionEvent
Returns the returnCode. The returnCode is used by the container for managing the navigation using the <webflow> tag from the portlet deployment descriptor, if the nextURI was not set with ActionEvent.setNextURI(net.sf.jportlet.portlet.PortletURI).

Specified by:
getReturnCode in interface ActionEvent
Returns:
String
See Also:
net.sf.jportlet.portlet.impl.EventImpl#getReturnCode()

setReturnCode

public void setReturnCode(java.lang.String returnCode)
Description copied from interface: ActionEvent
Set the returnCode.

Specified by:
setReturnCode in interface ActionEvent
Parameters:
returnCode -
See Also:
net.sf.jportlet.portlet.impl.EventImpl#setReturnCode(String)

addError

public void addError(java.lang.Object error)
Description copied from interface: ActionEvent
Add an error.

Specified by:
addError in interface ActionEvent
Returns:
Collection
See Also:
ActionEvent.addError(java.lang.Object)

hasErrors

public boolean hasErrors()
Description copied from interface: ActionEvent
Return true if the action has errors

Specified by:
hasErrors in interface ActionEvent
Returns:
boolean
See Also:
ActionEvent.hasErrors()

getNextURI

public net.sf.jportlet.portlet.PortletURI getNextURI()
Description copied from interface: ActionEvent
Return the URI where to move after the action is executed. If not set, the container will used ActionEvent.getReturnCode() to determine the URI where to move. This is useful for managing navigation inside the portlet.

Specified by:
getNextURI in interface ActionEvent
Returns:
PortletURI
See Also:
ActionEvent.getNextURI()

setNextURI

public void setNextURI(net.sf.jportlet.portlet.PortletURI nextURI)
Description copied from interface: ActionEvent
Set the URI where to move after the action is executed

Specified by:
setNextURI in interface ActionEvent
See Also:
ActionEvent.setNextURI(net.sf.jportlet.portlet.PortletURI)


Copyright © 2002 Herve Tchepannou. All Rights Reserved.