org.jboss.portal.portlet.test.support
Class PortletInvokerSupport

java.lang.Object
  extended by org.jboss.portal.portlet.test.support.PortletInvokerSupport
All Implemented Interfaces:
PortletInvoker

public class PortletInvokerSupport
extends java.lang.Object
implements PortletInvoker

Version:
$Revision: 6712 $
Author:
Julien Viet

Nested Class Summary
static class PortletInvokerSupport.InternalPortlet
           
 
Constructor Summary
PortletInvokerSupport()
           
 
Method Summary
 PortletInvokerSupport.InternalPortlet addInternalPortlet(java.lang.String portletId, PortletInfoSupport info)
           
 PortletInvokerSupport.InternalPortlet addInternalPortlet(java.lang.String portletId, PortletSupport support)
           
 PortletContext createClone(PortletContext portletContext)
          Clone a portlet.
 java.util.List destroyClones(java.util.List portletContexts)
          Destroy a cloned portlet.
 PortletInvokerSupport.InternalPortlet getInternalPortlet(java.lang.String portletId)
           
 Portlet getPortlet(PortletContext portletContext)
          Get information about a specific portlet.
 java.util.Set getPortlets()
          Return the set of portlet exposed.
 PropertyMap getProperties(PortletContext portletContext)
          Return all the properties of the specified portlet.
 PropertyMap getProperties(PortletContext portletContext, java.util.Set keys)
          Return a subset of the properties of the specified portlet.
 PortletInvocationResponse invoke(PortletInvocation invocation)
          Invoke an operation on a specific portlet.
 PortletInvokerSupport removeInternalPortlet(java.lang.String portletId)
           
 PortletContext setProperties(PortletContext portletContext, PropertyChange[] changes)
          Set the properties on the specified portlet.
 void setValid(java.lang.String portletId, boolean valid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletInvokerSupport

public PortletInvokerSupport()
Method Detail

setValid

public void setValid(java.lang.String portletId,
                     boolean valid)

addInternalPortlet

public PortletInvokerSupport.InternalPortlet addInternalPortlet(java.lang.String portletId,
                                                                PortletInfoSupport info)

addInternalPortlet

public PortletInvokerSupport.InternalPortlet addInternalPortlet(java.lang.String portletId,
                                                                PortletSupport support)

removeInternalPortlet

public PortletInvokerSupport removeInternalPortlet(java.lang.String portletId)

getInternalPortlet

public PortletInvokerSupport.InternalPortlet getInternalPortlet(java.lang.String portletId)

getPortlets

public java.util.Set getPortlets()
Description copied from interface: PortletInvoker
Return the set of portlet exposed.

Specified by:
getPortlets in interface PortletInvoker
Returns:
the set of exposed portlets

getPortlet

public Portlet getPortlet(PortletContext portletContext)
                   throws java.lang.IllegalArgumentException,
                          PortletInvokerException
Description copied from interface: PortletInvoker
Get information about a specific portlet.

Specified by:
getPortlet in interface PortletInvoker
Parameters:
portletContext - the portlet context in the scope of this invoker
Returns:
the PortletInfo for the specified portlet
Throws:
java.lang.IllegalArgumentException - if the portlet context is null
PortletInvokerException

invoke

public PortletInvocationResponse invoke(PortletInvocation invocation)
                                 throws PortletInvokerException
Description copied from interface: PortletInvoker
Invoke an operation on a specific portlet.

Specified by:
invoke in interface PortletInvoker
Parameters:
invocation - the portlet invocation
Returns:
the invocation response
Throws:
PortletInvokerException

getProperties

public PropertyMap getProperties(PortletContext portletContext,
                                 java.util.Set keys)
                          throws java.lang.IllegalArgumentException,
                                 PortletInvokerException,
                                 java.lang.UnsupportedOperationException
Description copied from interface: PortletInvoker
Return a subset of the properties of the specified portlet.

Specified by:
getProperties in interface PortletInvoker
Parameters:
portletContext - the portlet context
keys - the set of keys to retrieve
Returns:
the properties
Throws:
java.lang.IllegalArgumentException - if the portletContext or the keys arguments are null
java.lang.UnsupportedOperationException - if the invoker does not support this operation
PortletInvokerException

getProperties

public PropertyMap getProperties(PortletContext portletContext)
                          throws java.lang.IllegalArgumentException,
                                 PortletInvokerException,
                                 java.lang.UnsupportedOperationException
Description copied from interface: PortletInvoker
Return all the properties of the specified portlet.

Specified by:
getProperties in interface PortletInvoker
Parameters:
portletContext - the portlet context
Returns:
the properties
Throws:
java.lang.IllegalArgumentException - if the portletContext is null
java.lang.UnsupportedOperationException - if the invoker does not support this operation
PortletInvokerException

createClone

public PortletContext createClone(PortletContext portletContext)
                           throws java.lang.IllegalArgumentException,
                                  PortletInvokerException,
                                  java.lang.UnsupportedOperationException
Description copied from interface: PortletInvoker
Clone a portlet.

Specified by:
createClone in interface PortletInvoker
Returns:
the clone id
Throws:
java.lang.IllegalArgumentException - if the portletId is null
java.lang.UnsupportedOperationException - if the invoker does not support this operation
PortletInvokerException

destroyClones

public java.util.List destroyClones(java.util.List portletContexts)
                             throws java.lang.IllegalArgumentException,
                                    PortletInvokerException,
                                    java.lang.UnsupportedOperationException
Description copied from interface: PortletInvoker
Destroy a cloned portlet.

Specified by:
destroyClones in interface PortletInvoker
Parameters:
portletContexts - a list of portlet contexts to destroy
Returns:
a list of DestroyCloneFailure, one per clone that couldn't be destroyed
Throws:
java.lang.IllegalArgumentException - if the portletContext is null
java.lang.UnsupportedOperationException - if the invoker does not support this operation
PortletInvokerException

setProperties

public PortletContext setProperties(PortletContext portletContext,
                                    PropertyChange[] changes)
                             throws java.lang.IllegalArgumentException,
                                    PortletInvokerException,
                                    java.lang.UnsupportedOperationException
Description copied from interface: PortletInvoker
Set the properties on the specified portlet.

Specified by:
setProperties in interface PortletInvoker
Parameters:
portletContext - the portlet context
changes - the changes
Throws:
java.lang.IllegalArgumentException - if the portletContext or the properties is null
java.lang.UnsupportedOperationException - if the invoker does not support this operation
PortletInvokerException