com.ibm.wps.portlets.struts
Interface IStrutsPortletMessage

All Known Implementing Classes:
WpsStrutsPortletMessage

public interface IStrutsPortletMessage

The IStrutsPortletMessage class defines the interface for the PortletMessage that can be sent to the WpsStrutsPortlet. The attribute that is sent in the portlet message can be retrieved in the Struts action as a request attribute with the name WpsStrutsConstants.SPF_MESSAGE_ATTRIBUTE. The application should use the property broker instead of portlet messaging.

Since:
4.2

Method Summary
 java.lang.Object getAttribute()
          Returns the object set in the portlet message.
 java.lang.String getConcretePortletName()
          Returns the name of the concrete portlet.
 java.lang.String getStrutsAction()
          Returns the Struts action.
 java.lang.String getStrutsForward()
          Returns the Struts forward.
 void setAttribute(java.lang.Object attribute)
          The attribute that is passed to the message listener on the WpsStrutsPortlet.
 void setConcretePortletName(java.lang.String name)
          Sets the concrete portlet name for an additional level of filtering.
 void setStrutsAction(java.lang.String action)
          Sets the name of the Struts action that will be executed.
 void setStrutsForward(java.lang.String forward)
          Sets the name of a Struts forward that will be executed.
 

Method Detail

setAttribute

void setAttribute(java.lang.Object attribute)
The attribute that is passed to the message listener on the WpsStrutsPortlet. The attribute can then be obtained in a Struts action by getting the WpsStrutsConstants.SPF_MESSAGE_ATTRIBUTE from the request object.

Parameters:
attribute - the attribute to set

getAttribute

java.lang.Object getAttribute()
Returns the object set in the portlet message.

Returns:
returns the stored attribute, can be null if not set

setConcretePortletName

void setConcretePortletName(java.lang.String name)
Sets the concrete portlet name for an additional level of filtering. The PortletContext send is based on the name of the abstract portlet. If the concrete portlet name is specified then only that portlet will see the message.

Parameters:
name - the name of the concrete portlet

getConcretePortletName

java.lang.String getConcretePortletName()
Returns the name of the concrete portlet.

Returns:
returns the concrete portlet name, can be null if not set

setStrutsAction

void setStrutsAction(java.lang.String action)
Sets the name of the Struts action that will be executed. The action is assumed to be contextRelative.

Parameters:
action - the Struts action

getStrutsAction

java.lang.String getStrutsAction()
Returns the Struts action.

Returns:
returns the Struts action, can be null if not set

setStrutsForward

void setStrutsForward(java.lang.String forward)
Sets the name of a Struts forward that will be executed. The forward is assumed to be contextRelative. If the Struts forward and the Struts action are both set then only the action is executed.

Parameters:
forward - the Struts forward

getStrutsForward

java.lang.String getStrutsForward()
Returns the Struts forward.

Returns:
returns the Struts forward, can be null if not set