© 2004 BEA Systems, Inc.

com.bea.wsrp.consumer.management.portlet
Interface ProxyPortletManager


public interface ProxyPortletManager

Manages proxy portlets for one or more producers.


Nested Class Summary
static class ProxyPortletManager.Factory
          A ProxyPortletManager factory.
 
Method Summary
 void clearDestroyErrors(int[] proxyPortletIds)
          Clears the delete errors associated with proxy portlets thus making them deletable.
 int createProxyPortlet(String producerHandle, PortletDescription portletDescription, Locale locale, HttpServletRequest httpRequest, String webAppName)
          Creates a proxy portlet.
 byte[] getPortletState(int portletInstanceId)
          Retrieves the portlet state byte array.
 ProxyPortletInfo[] getProxyPortletsWithDestroyErrors(String webAppName, String producerHandle)
          Returns PortletDescriptions for proxy portlets that had errors on delete for a given producer.
 Map getRemovableProxyPortlets(String webAppName)
          Returns a map of ProxyPortletInfo arrays that are removable keyed by Integer producer ids.
 int[] listAddedProxyPortlets(String webAppName, String producerHandle)
          Lists all portlets that have been added for the specified producer.
 int[] listCustomizedProxyPortlets(String webAppName, String producerHandle)
          Lists all portlets that have been customized for the specified producer.
 int removeProxyPortlets(String webAppName, int[] proxyPortletIds)
          Removes proxy portlets marked for delete for a given webApp.
 int removeProxyPortlets(String webAppName, int producerId, boolean removePrimaryInstances)
          Deletes ProxyPortlets for a given producer and web app.
 void setDestroyErrors(Map errorCauses)
          Sets delete error causes on a set of proxy portlets Note: This method will fail silently for proxy portlets that don't exist.
 int updateProxyPortlet(HttpServletRequest httpRequest, String webAppName, String portalPath, String desktopPath, int portletInstanceId, String portletHandle, byte stateChangeFlag, byte[] portletState, boolean ensureSuccessor)
          Updates specific attributes of a proxy portlet.
 

Method Detail

clearDestroyErrors

public void clearDestroyErrors(int[] proxyPortletIds)
                        throws IllegalArgumentException,
                               ProxyPortletManagerException
Clears the delete errors associated with proxy portlets thus making them deletable.

Parameters:
proxyPortletIds - unique IDs for proxy portlets under consideration
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

createProxyPortlet

public int createProxyPortlet(String producerHandle,
                              PortletDescription portletDescription,
                              Locale locale,
                              HttpServletRequest httpRequest,
                              String webAppName)
                       throws IllegalArgumentException,
                              ProxyPortletManagerException

Creates a proxy portlet.

Parameters:
producerHandle - producer handle
portletDescription - portlet description
webAppName - name of the webapp in which proxy portlets reside
Returns:
portlet definition ID for the proxy portlet
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

getPortletState

public byte[] getPortletState(int portletInstanceId)
                       throws IllegalArgumentException,
                              ProxyPortletManagerException
Retrieves the portlet state byte array.

Parameters:
portletInstanceId - unique ID of proxy portlet
Returns:
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

getProxyPortletsWithDestroyErrors

public ProxyPortletInfo[] getProxyPortletsWithDestroyErrors(String webAppName,
                                                            String producerHandle)
                                                     throws IllegalArgumentException,
                                                            ProxyPortletManagerException
Returns PortletDescriptions for proxy portlets that had errors on delete for a given producer.

Parameters:
webAppName - web application name
producerHandle - consumer specific unique handle for a producer
Returns:
ProxyPortletInfo representing proxy portlets that encountered errors on destroy
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

getRemovableProxyPortlets

public Map getRemovableProxyPortlets(String webAppName)
                              throws IllegalArgumentException,
                                     ProxyPortletManagerException
Returns a map of ProxyPortletInfo arrays that are removable keyed by Integer producer ids. Also locally removes primary portlet instances that are removable so that an a destroy is not attempted on a producer offered portlet.

Parameters:
webAppName - web application name
Returns:
Map of removable portlets keyed by producers
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

listAddedProxyPortlets

public int[] listAddedProxyPortlets(String webAppName,
                                    String producerHandle)
                             throws IllegalArgumentException,
                                    ProxyPortletManagerException

Lists all portlets that have been added for the specified producer. Returns an empty array if no portlets have been added.

Parameters:
webAppName - webApp name
producerHandle - handle for the producer being queried
Returns:
an array of portlet definition IDs representing portlets that have been added for the specified producer
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

listCustomizedProxyPortlets

public int[] listCustomizedProxyPortlets(String webAppName,
                                         String producerHandle)
                                  throws IllegalArgumentException,
                                         ProxyPortletManagerException

Lists all portlets that have been customized for the specified producer. Returns an empty array if no portlets have been customized.

Parameters:
webAppName - web application name
producerHandle - handle for the producer being queried
Returns:
an array of portlet instance IDs representing the portlets that have been customized for the specified producer
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

removeProxyPortlets

public int removeProxyPortlets(String webAppName,
                               int[] proxyPortletIds)
                        throws IllegalArgumentException,
                               ProxyPortletManagerException

Removes proxy portlets marked for delete for a given webApp.

Parameters:
webAppName - web application name
proxyPortletIds - IDs for proxy portlets to be removed
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

removeProxyPortlets

public int removeProxyPortlets(String webAppName,
                               int producerId,
                               boolean removePrimaryInstances)
                        throws IllegalArgumentException,
                               ProxyPortletManagerException
Deletes ProxyPortlets for a given producer and web app.

Parameters:
webAppName - web application name
producerId - unique consumer specific producer ID
removePrimaryInstances - Removes primary instances also if set to true
Returns:
number of proxy portlets removed
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

setDestroyErrors

public void setDestroyErrors(Map errorCauses)
                      throws IllegalArgumentException,
                             ProxyPortletManagerException
Sets delete error causes on a set of proxy portlets Note: This method will fail silently for proxy portlets that don't exist.

Parameters:
errorCauses - A map of string error causes keyed by Integer proxyPortletIds
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

updateProxyPortlet

public int updateProxyPortlet(HttpServletRequest httpRequest,
                              String webAppName,
                              String portalPath,
                              String desktopPath,
                              int portletInstanceId,
                              String portletHandle,
                              byte stateChangeFlag,
                              byte[] portletState,
                              boolean ensureSuccessor)
                       throws IllegalArgumentException,
                              ProxyPortletManagerException
Updates specific attributes of a proxy portlet.

Parameters:
httpRequest - HttpServletRequest
webAppName - web application name
portalPath - portal path of desktop under consideration
desktopPath - desktop path of desktop under consideration
portletInstanceId - portlet instance id
portletHandle - portlet handle
stateChangeFlag - portlet state change flag
portletState - portlet state
ensureSuccessor - boolean to specify if a successor needs to be created
Returns:
instanceId of the portlet - new one if a successor was created
Throws:
IllegalArgumentException - thrown when input arguments are not valid
ProxyPortletManagerException - thrown when a general error is encountered

© 2004 BEA Systems, Inc.

Copyright © 2004 BEA Systems, Inc. All Rights Reserved