org.apache.wsrp4j.consumer
Interface PortletDriver

All Known Implementing Classes:
PortletDriverImpl

public interface PortletDriver

The portlet driver is a wrapper for all action which can be performed on an portlet. There is one portlet driver for all instances of an portlet.


Method Summary
 PortletContext clonePortlet(java.lang.String userID)
          Clone the portlet
 DestroyPortletsResponse destroyPortlets(java.lang.String[] portletHandles, java.lang.String userID)
          Destroy the producer portlets specified in the entiyHandles array.
 MarkupResponse getMarkup(MarkupRequest markupRequest, java.lang.String userID)
          This method is used to retrieve the markup generated by the portlet instance.
 WSRPPortlet getPortlet()
          Get the portlet this driver is bound to.
 PortletDescriptionResponse getPortletDescription(java.lang.String userID, java.lang.String[] desiredLocales)
          Fetches information about the portlet from the producer.
 PropertyList getPortletProperties(java.lang.String[] names, java.lang.String userID)
          Get the current values of the properties with the given names.
 PortletPropertyDescriptionResponse getPortletPropertyDescription(java.lang.String userID)
          Fetches all published properties of an remote portlet.
 void initCookie()
           
 BlockingInteractionResponse performBlockingInteraction(InteractionRequest actionRequest, java.lang.String userID)
          This method is used to perform a blocking interaction on the portlet instance.
 ReturnAny releaseSessions(java.lang.String[] sessionIDs, java.lang.String userID)
          Inform the producer that the sessions specified in the sessionIDs array will no longer be used by the consumer and can therefor be released.
 PortletContext setPortletProperties(PropertyList properties, java.lang.String userID)
          Set the portlet properties specified in the property list
 

Method Detail

getPortlet

public WSRPPortlet getPortlet()
Get the portlet this driver is bound to.

Returns:
The enity

getMarkup

public MarkupResponse getMarkup(MarkupRequest markupRequest,
                                java.lang.String userID)
                         throws WSRPException
This method is used to retrieve the markup generated by the portlet instance.

Parameters:
markupRequest - The markup request
Returns:
The markup response generated by portlet
Throws:
WSRPException

performBlockingInteraction

public BlockingInteractionResponse performBlockingInteraction(InteractionRequest actionRequest,
                                                              java.lang.String userID)
                                                       throws WSRPException
This method is used to perform a blocking interaction on the portlet instance.

Parameters:
actionRequest - The interaction request
Throws:
WSRPException

clonePortlet

public PortletContext clonePortlet(java.lang.String userID)
                            throws WSRPException
Clone the portlet

Returns:
The new portlet context
Throws:
WSRPException

initCookie

public void initCookie()
                throws WSRPException
Throws:
WSRPException

destroyPortlets

public DestroyPortletsResponse destroyPortlets(java.lang.String[] portletHandles,
                                               java.lang.String userID)
                                        throws WSRPException
Destroy the producer portlets specified in the entiyHandles array.

Throws:
WSRPException

releaseSessions

public ReturnAny releaseSessions(java.lang.String[] sessionIDs,
                                 java.lang.String userID)
                          throws WSRPException
Inform the producer that the sessions specified in the sessionIDs array will no longer be used by the consumer and can therefor be released.

Throws:
WSRPException

getPortletDescription

public PortletDescriptionResponse getPortletDescription(java.lang.String userID,
                                                        java.lang.String[] desiredLocales)
                                                 throws WSRPException
Fetches information about the portlet from the producer.

Parameters:
userID - is used to get the user context of the user from the user registry
desiredLocales - Array of locales the description should be provided
Returns:
The response to the getPortletDescription call.
Throws:
WSRPException

getPortletPropertyDescription

public PortletPropertyDescriptionResponse getPortletPropertyDescription(java.lang.String userID)
                                                                 throws WSRPException
Fetches all published properties of an remote portlet.

Parameters:
userID - The ID of the user this request is done for
Returns:
The portlet property description response from the producer
Throws:
WSRPException

getPortletProperties

public PropertyList getPortletProperties(java.lang.String[] names,
                                         java.lang.String userID)
                                  throws WSRPException
Get the current values of the properties with the given names.

Parameters:
names - The names of the properties
userID - The ID of the user is used to get the user context
Returns:
A list of properties containing the values and names of the properties.
Throws:
WSRPException

setPortletProperties

public PortletContext setPortletProperties(PropertyList properties,
                                           java.lang.String userID)
                                    throws WSRPException
Set the portlet properties specified in the property list

Parameters:
properties - List of properties to be set.
userID - The ID of the user is used to get the user context
Throws:
WSRPException