net.sf.jportlet.portlet.event
Interface ActionEvent

All Superinterfaces:
Event
All Known Implementing Classes:
ActionEventImpl

public interface ActionEvent
extends Event

An ActionEvent is sent by the portlet container when an HTTP request is received that is associated with an action

Author:
Herve Tchepannou

Field Summary
static java.lang.String ACTION_CONFIGURE
          Name of the action if the portlet in Portlet.Mode.CONFIGURE mode
static java.lang.String ACTION_EDIT
          Name of the action if the portlet in Portlet.Mode.EDIT mode
static java.lang.String ACTION_HELP
          Name of the action if the portlet in Portlet.Mode.HELP mode
static java.lang.String ACTION_VIEW
          Name of the action if the portlet in Portlet.Mode.VIEW mode
static java.lang.String RETURN_ERROR
          Code to return if an error has occured while perfoming the action
static java.lang.String RETURN_INPUT
          Code to return if mode input data are required
static java.lang.String RETURN_SUCCESS
          Code to return if performing the action was successfull
 
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 interface net.sf.jportlet.portlet.event.Event
getPortlet, getPortletRequest, getPortletResponse
 

Field Detail

ACTION_CONFIGURE

public static final java.lang.String ACTION_CONFIGURE
Name of the action if the portlet in Portlet.Mode.CONFIGURE mode

See Also:
Constant Field Values

ACTION_EDIT

public static final java.lang.String ACTION_EDIT
Name of the action if the portlet in Portlet.Mode.EDIT mode

See Also:
Constant Field Values

ACTION_HELP

public static final java.lang.String ACTION_HELP
Name of the action if the portlet in Portlet.Mode.HELP mode

See Also:
Constant Field Values

ACTION_VIEW

public static final java.lang.String ACTION_VIEW
Name of the action if the portlet in Portlet.Mode.VIEW mode

See Also:
Constant Field Values

RETURN_ERROR

public static final java.lang.String RETURN_ERROR
Code to return if an error has occured while perfoming the action

See Also:
Constant Field Values

RETURN_SUCCESS

public static final java.lang.String RETURN_SUCCESS
Code to return if performing the action was successfull

See Also:
Constant Field Values

RETURN_INPUT

public static final java.lang.String RETURN_INPUT
Code to return if mode input data are required

See Also:
Constant Field Values
Method Detail

addError

public void addError(java.lang.Object error)
Add an error.

Returns:
Collection

hasErrors

public boolean hasErrors()
Return true if the action has errors

Returns:
boolean

getAction

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

Returns:
PortletAction

getReturnCode

public java.lang.String getReturnCode()
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 setNextURI(net.sf.jportlet.portlet.PortletURI).

Returns:
String

getNextURI

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

Returns:
PortletURI

setReturnCode

public void setReturnCode(java.lang.String returnCode)
Set the returnCode.

Parameters:
returnCode -
See Also:
RETURN_SUCCESS, RETURN_ERROR, RETURN_INPUT

setNextURI

public void setNextURI(net.sf.jportlet.portlet.PortletURI nextURI)
Set the URI where to move after the action is executed



Copyright © 2002 Herve Tchepannou. All Rights Reserved.