Liferay 7.0-ce-b4

com.liferay.portal.kernel.portlet.bridges.mvc
Interface MVCActionCommand

All Superinterfaces:
MVCCommand
All Known Subinterfaces:
FormMVCActionCommand
All Known Implementing Classes:
BaseFormMVCActionCommand, BaseMVCActionCommand, BaseTransactionalMVCActionCommand

public interface MVCActionCommand
extends MVCCommand

Provides an interface to allow the portlet to process a particular action request. This interface can only be used when the portlet is based on MVCPortlet.

The action command to be invoked is determined by two factors:

Implementations of this interface must be OSGi components that are registered in the OSGi Registry with the following properties:

The method MVCPortlet.processAction(ActionRequest, ActionResponse) searches the OSGi Registry for the action command that matches both the portlet name with the property javax.portlet.name and the parameter value ActionRequest.ACTION_NAME with the property mvc.command.name.

In general, only one action command is executed per portlet action URL. If the parameter value ActionRequest.ACTION_NAME is, however, a comma separated list of names, MVCPortlet finds the matching action commands and invokes them sequentially in the order they're specified in the list.

When there are multiple action commands registered for the same portlet name and with the same command name, only the action command with the highest service ranking is invoked.

BaseMVCActionCommand is an abstract class that implements this interface and can be extended to simplify using action commands.


Field Summary
static MVCActionCommand EMPTY
           
 
Method Summary
 boolean processAction(ActionRequest actionRequest, ActionResponse actionResponse)
          Invoked by MVCPortlet to allow the portlet to process an action request.
 

Field Detail

EMPTY

static final MVCActionCommand EMPTY
Method Detail

processAction

boolean processAction(ActionRequest actionRequest,
                      ActionResponse actionResponse)
                      throws PortletException
Invoked by MVCPortlet to allow the portlet to process an action request.

Parameters:
actionRequest - the action request
actionResponse - the action response
Returns:
true if an error occurs in processing the action request; false otherwise
Throws:
PortletException

Liferay 7.0-ce-b4