org.jboss.portal.portlet.federation.impl
Class FederatingPortletInvokerService

java.lang.Object
  extended by org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService
All Implemented Interfaces:
FederatingPortletInvoker, PortletInvoker

public class FederatingPortletInvokerService
extends java.lang.Object
implements FederatingPortletInvoker

Since:
2.4
Version:
$Revision: 5918 $
Author:
Julien Viet, Chris Laprun

Constructor Summary
FederatingPortletInvokerService()
           
 
Method Summary
 PortletContext createClone(PortletContext compoundPortletContext)
          Clone a portlet.
 java.util.List<DestroyCloneFailure> destroyClones(java.util.List<PortletContext> portletContexts)
          Destroy a cloned portlet.
 FederatedPortletInvoker getFederatedInvoker(java.lang.String federatedId)
          Return a portlet invoker registered or null if not found
 java.util.Collection<FederatedPortletInvoker> getFederatedInvokers()
          Return the registered portlet invokers.
 Portlet getPortlet(PortletContext compoundPortletContext)
          Get information about a specific portlet.
 java.util.Set<Portlet> getPortlets()
          Return the set of portlet exposed.
 PropertyMap getProperties(PortletContext compoundPortletContext)
          Return all the properties of the specified portlet.
 PropertyMap getProperties(PortletContext compoundPortletContext, java.util.Set<java.lang.String> keys)
          Return a subset of the properties of the specified portlet.
 PortletInvocationResponse invoke(PortletInvocation invocation)
          Invoke an operation on a specific portlet.
 FederatedPortletInvoker registerInvoker(java.lang.String federatedId, PortletInvoker federatedInvoker)
          Registers an invoker.
 PortletContext setProperties(PortletContext compoundPortletContext, PropertyChange[] changes)
          Set the properties on the specified portlet.
 void unregisterInvoker(java.lang.String federatedId)
          Unregisters the invoker associated with the specified identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FederatingPortletInvokerService

public FederatingPortletInvokerService()
Method Detail

registerInvoker

public FederatedPortletInvoker registerInvoker(java.lang.String federatedId,
                                               PortletInvoker federatedInvoker)
Description copied from interface: FederatingPortletInvoker
Registers an invoker.

Specified by:
registerInvoker in interface FederatingPortletInvoker
Parameters:
federatedId - the invoker id to register
federatedInvoker - the invoker to register

unregisterInvoker

public void unregisterInvoker(java.lang.String federatedId)
Description copied from interface: FederatingPortletInvoker
Unregisters the invoker associated with the specified identifier.

Specified by:
unregisterInvoker in interface FederatingPortletInvoker
Parameters:
federatedId - the identifier of the invoker to unregister

getFederatedInvoker

public FederatedPortletInvoker getFederatedInvoker(java.lang.String federatedId)
                                            throws java.lang.IllegalArgumentException
Description copied from interface: FederatingPortletInvoker
Return a portlet invoker registered or null if not found

Specified by:
getFederatedInvoker in interface FederatingPortletInvoker
Parameters:
federatedId - the id
Returns:
the invoker
Throws:
java.lang.IllegalArgumentException - if the id is null

getFederatedInvokers

public java.util.Collection<FederatedPortletInvoker> getFederatedInvokers()
Description copied from interface: FederatingPortletInvoker
Return the registered portlet invokers.

Specified by:
getFederatedInvokers in interface FederatingPortletInvoker
Returns:
a collection that contains the portlet invokers

getPortlets

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

Specified by:
getPortlets in interface PortletInvoker
Returns:
the set of exposed portlets
Throws:
PortletInvokerException - a portlet invoker exception

getPortlet

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

Specified by:
getPortlet in interface PortletInvoker
Parameters:
compoundPortletContext - 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 - a portlet invoker exception

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 - a portlet invoker exception

createClone

public PortletContext createClone(PortletContext compoundPortletContext)
                           throws PortletInvokerException
Description copied from interface: PortletInvoker
Clone a portlet.

Specified by:
createClone in interface PortletInvoker
Parameters:
compoundPortletContext - the portlet context to clone
Returns:
the clone id
Throws:
PortletInvokerException - a portlet invoker exception

destroyClones

public java.util.List<DestroyCloneFailure> destroyClones(java.util.List<PortletContext> 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
PortletInvokerException - a portlet invoker exception
java.lang.UnsupportedOperationException - if the invoker does not support this operation

getProperties

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

Specified by:
getProperties in interface PortletInvoker
Parameters:
compoundPortletContext - the portlet context
keys - the set of keys to retrieve
Returns:
the properties
Throws:
PortletInvokerException - a portlet invoker exception

getProperties

public PropertyMap getProperties(PortletContext compoundPortletContext)
                          throws PortletInvokerException
Description copied from interface: PortletInvoker
Return all the properties of the specified portlet.

Specified by:
getProperties in interface PortletInvoker
Parameters:
compoundPortletContext - the portlet context
Returns:
the properties
Throws:
PortletInvokerException - a portlet invoker exception

setProperties

public PortletContext setProperties(PortletContext compoundPortletContext,
                                    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:
compoundPortletContext - the portlet context
changes - the changes
Returns:
the new portlet context
Throws:
java.lang.IllegalArgumentException - if the portletContext or the properties is null
PortletInvokerException - a portlet invoker exception
java.lang.UnsupportedOperationException - if the invoker does not support this operation


Copyright © 2008. All Rights Reserved.