站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

ProducerPortletInvoker - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.portlet.state.producer
Class ProducerPortletInvoker

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.portal.jems.as.system.AbstractJBossService
              extended byorg.jboss.portal.portlet.state.producer.ProducerPortletInvoker
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, PortletInvoker, org.jboss.system.Service, org.jboss.system.ServiceMBean
Direct Known Subclasses:
ProducerPortletInvoker

public class ProducerPortletInvoker
extends AbstractJBossService
implements PortletInvoker

Version:
$Revision: 5448 $
Author:
Julien Viet

Field Summary
private static java.lang.String CONSUMER_CLONE_ID
          .
private  ProducerPersistenceManager persistenceManager
          .
private  PortletInvoker portletInvoker
          .
private static java.lang.String PRODUCER_CLONE_ID_PREFIX
          .
private  StateConverter stateConverter
          .
private  StateManagementPolicy stateManagementPolicy
          .
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
ProducerPortletInvoker()
           
 
Method Summary
 PortletContext createClone(PortletContext portletContext)
          Clone a portlet.
 java.util.List destroyClones(java.util.List portletContexts)
          Destroy a cloned portlet.
 ProducerPersistenceManager getPersistenceManager()
           
 Portlet getPortlet(PortletContext portletContext)
          Get information about a specific portlet.
 PortletInvoker getPortletInvoker()
           
 java.util.Set getPortlets()
          Return the set of portlet exposed.
private  ProducerState getProducerState(PortletContext portletContext)
          Return the producer state from the specified portlet context or null if that portlet context reference a producer offered portlet.
 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.
private  PropertyMap getPropertiesFromMetaData(java.lang.String portletId)
          Retrieve the properties from the portlet meta data.
 StateConverter getStateConverter()
           
 StateManagementPolicy getStateManagementPolicy()
           
 PortletInvocationResponse invoke(PortletInvocation invocation)
          Invoke an operation on a specific portlet.
private  StatefulPortletContext marshall(java.lang.String portletId, PropertyMap props)
           
 void setPersistenceManager(ProducerPersistenceManager ppm)
           
 void setPortletInvoker(PortletInvoker portletInvoker)
           
 PortletContext setProperties(PortletContext portletContext, PropertyChange[] changes)
          Set the properties on the specified portlet.
 void setStateConverter(StateConverter stateConverter)
           
 void setStateManagementPolicy(StateManagementPolicy stateManagementPolicy)
           
 
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService
create, destroy, getState, getStateString, start, stop
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, startService, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRODUCER_CLONE_ID_PREFIX

private static final java.lang.String PRODUCER_CLONE_ID_PREFIX
.

See Also:
Constant Field Values

CONSUMER_CLONE_ID

private static final java.lang.String CONSUMER_CLONE_ID
.

See Also:
Constant Field Values

portletInvoker

private PortletInvoker portletInvoker
.


persistenceManager

private ProducerPersistenceManager persistenceManager
.


stateManagementPolicy

private StateManagementPolicy stateManagementPolicy
.


stateConverter

private StateConverter stateConverter
.

Constructor Detail

ProducerPortletInvoker

public ProducerPortletInvoker()
Method Detail

getPortletInvoker

public PortletInvoker getPortletInvoker()

setPortletInvoker

public void setPortletInvoker(PortletInvoker portletInvoker)

getPersistenceManager

public ProducerPersistenceManager getPersistenceManager()

setPersistenceManager

public void setPersistenceManager(ProducerPersistenceManager ppm)

getStateManagementPolicy

public StateManagementPolicy getStateManagementPolicy()

setStateManagementPolicy

public void setStateManagementPolicy(StateManagementPolicy stateManagementPolicy)

getStateConverter

public StateConverter getStateConverter()

setStateConverter

public void setStateConverter(StateConverter stateConverter)

getPortlets

public java.util.Set 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

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,
                                        InvocationException
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 invocatin response
Throws:
PortletInvokerException
InvocationException

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.UnsupportedOperationException - if the invoker does not support this operation
java.lang.IllegalArgumentException - if the portletId is null
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 portlet ids that were not destroyed during the operation
Throws:
java.lang.IllegalArgumentException - if the portletId is null
java.lang.UnsupportedOperationException - if the invoker does not support this operation
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.UnsupportedOperationException - if the invoker does not support this operation
java.lang.IllegalArgumentException - if the portletId or the keys arguments are null
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.UnsupportedOperationException - if the invoker does not support this operation
java.lang.IllegalArgumentException - if the portletId is null
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.UnsupportedOperationException - if the invoker does not support this operation
java.lang.IllegalArgumentException - if the portletId or the properties is null
PortletInvokerException

marshall

private StatefulPortletContext marshall(java.lang.String portletId,
                                        PropertyMap props)
                                 throws PortletInvokerException
Throws:
PortletInvokerException

getPropertiesFromMetaData

private PropertyMap getPropertiesFromMetaData(java.lang.String portletId)
                                       throws PortletInvokerException
Retrieve the properties from the portlet meta data.

Parameters:
portletId - the portlet id
Returns:
the properties
Throws:
PortletInvokerException

getProducerState

private ProducerState getProducerState(PortletContext portletContext)
                                throws NoSuchPortletException,
                                       InvalidPortletIdException
Return the producer state from the specified portlet context or null if that portlet context reference a producer offered portlet.

Parameters:
portletContext - the portlet context
Returns:
the state that the portlet context carries
Throws:
NoSuchPortletException - if the underlying state does not exist
InvalidPortletIdException - if the state id is not valid