org.apache.wsrp4j.consumer.driver
Class PortletDriverImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.PortletDriverImpl
All Implemented Interfaces:
PortletDriver

public class PortletDriverImpl
extends java.lang.Object
implements PortletDriver

This class implements a portlet driver


Constructor Summary
PortletDriverImpl(WSRPPortlet portlet, ConsumerEnvironment consumerEnv)
           
 
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 bind 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()
          Actual WSRP initCookie() call
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletDriverImpl

public PortletDriverImpl(WSRPPortlet portlet,
                         ConsumerEnvironment consumerEnv)
                  throws WSRPException
Method Detail

getPortlet

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

Specified by:
getPortlet in interface PortletDriver
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.

Specified by:
getMarkup in interface PortletDriver
Parameters:
markupRequest -
userID -
Returns:
The markup response generated by the 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.

Specified by:
performBlockingInteraction in interface PortletDriver
Parameters:
actionRequest -
Throws:
WSRPException

clonePortlet

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

Specified by:
clonePortlet in interface PortletDriver
Returns:
The new portlet context
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.

Specified by:
destroyPortlets in interface PortletDriver
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.

Specified by:
releaseSessions in interface PortletDriver
Throws:
WSRPException

initCookie

public void initCookie()
                throws WSRPException
Actual WSRP initCookie() call

Specified by:
initCookie in interface PortletDriver
Throws:
WSRPException

getPortletDescription

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

Specified by:
getPortletDescription in interface PortletDriver
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.

Specified by:
getPortletPropertyDescription in interface PortletDriver
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.

Specified by:
getPortletProperties in interface PortletDriver
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

Specified by:
setPortletProperties in interface PortletDriver
Parameters:
properties - List of properties to be set.
userID - The ID of the user is used to get the user context
Throws:
WSRPException