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


public interface ProxyPortletManager

Manages proxy portlets for one or more producers.

This interface is intended to be implemented only by Oracle Weblogic Portal. Oracle Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of Oracle Weblogic Portal.

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, IPortletDescription portletDescription, Locale locale, javax.servlet.http.HttpServletRequest httpRequest, String webAppName)
          Creates a proxy portlet.
 int createProxyPortlet(String producerHandle, com.bea.wsrp.types.PortletDescription portletDescription, Locale locale, javax.servlet.http.HttpServletRequest httpRequest, String webAppName)
          Deprecated This method will be removed in a future release. Use createProxyPortlet(String, IPortletDescription, locale, httpRequest, webAppName).
 byte[] getPortletState(int portletInstanceId)
          Retrieves the portlet state byte array.
 ProxyPortletInfo getProxyPortlet(int portletInstanceId)
          Returns the proxy portlet with the given instance ID.
 ProxyPortletInfo[] getProxyPortletsWithDestroyErrors(String webAppName, String producerHandle)
          Returns PortletDescriptions for proxy portlets that had errors on delete for a given producer.
 Map<Integer,ProxyPortletInfo[]> 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(javax.servlet.http.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.
 int updateProxyPortlet(javax.servlet.http.HttpServletRequest httpRequest, String webAppName, String portalPath, String desktopPath, int portletInstanceId, String portletHandle, byte stateChangeFlag, byte[] portletState, boolean ensureSuccessor, boolean updatePOP)
          Updates specific attributes of a proxy portlet.
 

Method Detail

listAddedProxyPortlets

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

createProxyPortlet

@Deprecated
int createProxyPortlet(String producerHandle,
                                  com.bea.wsrp.types.PortletDescription portletDescription,
                                  Locale locale,
                                  javax.servlet.http.HttpServletRequest httpRequest,
                                  String webAppName)
                       throws IllegalArgumentException,
                              ProxyPortletManagerException
Deprecated This method will be removed in a future release. Use createProxyPortlet(String, IPortletDescription, locale, httpRequest, webAppName).

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

createProxyPortlet

int createProxyPortlet(String producerHandle,
                       IPortletDescription portletDescription,
                       Locale locale,
                       javax.servlet.http.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

updateProxyPortlet

int updateProxyPortlet(javax.servlet.http.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

updateProxyPortlet

int updateProxyPortlet(javax.servlet.http.HttpServletRequest httpRequest,
                       String webAppName,
                       String portalPath,
                       String desktopPath,
                       int portletInstanceId,
                       String portletHandle,
                       byte stateChangeFlag,
                       byte[] portletState,
                       boolean ensureSuccessor,
                       boolean updatePOP)
                       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
updatePOP - set to true if the producer offered portlet field should be updated
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

getProxyPortlet

ProxyPortletInfo getProxyPortlet(int portletInstanceId)
                                 throws IllegalArgumentException,
                                        ProxyPortletManagerException
Returns the proxy portlet with the given instance ID. If the portlet with the given ID does not exist, this method returns null.

Parameters
portletInstanceId - instance ID
Returns
instance info, or null
Throws
IllegalArgumentException
ProxyPortletManagerException

getPortletState

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

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

setDestroyErrors

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

clearDestroyErrors

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

getProxyPortletsWithDestroyErrors

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

Map<Integer,ProxyPortletInfo[]> 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

removeProxyPortlets

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

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

listCustomizedProxyPortlets

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


Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.