Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wsrp.consumer.management.portlet
Interface BulkPortletManager

    public interface BulkPortletManager

Manages bulk portlet operations on producers.

This interface is intended to be implemented only by BEA Weblogic Portal. BEA 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 BEA Weblogic Portal.

Nested Class Summary
`static class` | `BulkPortletManager.Factory` A `BulkPortletManager` factory.

Method Summary
`ExportPortletsResponse` | `exportPortlets(String producerHandle, List<PortletInstanceId> portlets, boolean exportByValueRequired, String webappName)` Performs a bulk portlet export operation, exporting portlet state and preference information from the specified producer's portlet instances in a form which may be subsequently imported to the producer.
`ExportPortletsResponse` | `exportPortlets(String producerHandle, List<PortletInstanceId> portlets, boolean exportByValueRequired, String webappName, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, javax.servlet.ServletContext servletContext)` Performs a bulk portlet export operation, exporting portlet state and preference information from the specified producer's portlet instances in a form which may be subsequently imported to the producer.
`int` | `getExportBatchSize(List<PortletInstanceId> portlets)` Determines the batch size for a bulk portlet export operation- the number of portlets which would be exported from the producer given the arguments.
`ImportPortletsResponse` | `importPortlets(String producerHandle, ExportedPortlets exportedPortlets, Map<PortletInstanceId,String> receivingProxyPortlets, String webappName)` Performs a bulk portlet import operation, importing portlet state and preference information from previously exported portlets.
`com.bea.wsrp.consumer.management.portlet.ImportPortletsResponseImpl` | `importPortlets(String producerHandle, ExportedPortlets exportedPortlets, Map<PortletInstanceId,String> receivingProxyPortlets, String webappName, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, javax.servlet.ServletContext servletContext)` Performs a bulk portlet import operation, importing portlet state and preference information from previously exported portlets.
`boolean` | `isExportSupported(String producerHandle, String webappName, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, javax.servlet.ServletContext servletContext)` Test whether the producer supports the export operation
`boolean` | `isImportSupported(String producerHandle, String webappName, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, javax.servlet.ServletContext servletContext)` Test whether the producer supports the import operation
`void` | `releaseExport(String producerHandle, ExportedPortlets export)` Indicates to the Producer that it no longer needs to maintain any stored artifacts relative to a particular export, if the producer stored any such artifacts.

Method Detail

### getExportBatchSize

    int getExportBatchSize(List<PortletInstanceId> portlets)
                           throws BulkPortletManagerException

  Determines the batch size for a bulk portlet export operation- the number of portlets which would be exported from the producer given the arguments. This can be useful in determining if a exportPortlets() request is too large and would throw a ExportBatchTooLargeException. The return value is always going to be a number less than or equal to the size of the supplied List portlets argument- it can be less if multiple copies of the same portlet instance on the producer are in the list.

  To be safe, always limit export request batch sizes to be less than the producer's recommended size or use this method to ensure that the actual request batch sent to the producer is smaller than the producer's recommended size. If the producer does not specify a recommended export size, remember that unreasonably large batch sizes may result in transaction and transport timeout errors, so limiting export batches to a reasonable size is always a good idea.

  To determine the maximum recommended export batch size for a producer, get the producer's service description from the com.bea.wsrp.consumer.management.producer.ProducerManager getProducerServiceDescription() method and then determine the maximum batch size from IServiceDescription.getRecommendedExportBatchSize()

  Throws
    `BulkPortletManagerException`

### exportPortlets

    ExportPortletsResponse exportPortlets(String producerHandle,
                                          List<PortletInstanceId> portlets,
                                          boolean exportByValueRequired,
                                          String webappName,
                                          javax.servlet.http.HttpServletRequest httpRequest,
                                          javax.servlet.http.HttpServletResponse httpResponse,
                                          javax.servlet.ServletContext servletContext)
                                          throws BulkPortletManagerException

  Performs a bulk portlet export operation, exporting portlet state and preference information from the specified producer's portlet instances in a form which may be subsequently imported to the producer.

  Note that multiple consumer-side portlet instances may actually be using the same remote portlet (identified by portlet handle) on the producer side. The export operation automatically removes duplicate requests to export a specific portlet handle. For this reason, it is possible to have fewer exported portlets returned than were requested to be exported- and it is not an error. Multiple proxy portlets were merely utilizing the same remote portlet (portlet handle).

  To be safe, always limit export request batch sizes to be less than the producer's recommended size or use the getExportBatchSize() method to ensure that the actual request batch sent to the producer is smaller than the producer's recommended size. If the producer does not specify a recommended export size, remember that unreasonably large batch sizes may result in transaction and transport timeout errors, so limiting export batches to a reasonable size is always a good idea.

  Parameters
    `producerHandle` - the handle for the producer to export from.
    `portlets` - the list of portlets (associated with proxy portlets) to export. This list should not be larger than the producer's recommended export batch size or a ExportBatchTooLargeException may be thrown. To determine the maximum recommended export batch size for a producer, get the producer's service description from the com.bea.wsrp.consumer.management.producer.ProducerManager getProducerServiceDescription() method and then determine the maximum batch size from IServiceDescription.getRecommendedExportBatchSize()
    `exportByValueRequired` - if `true`, the producer is required to export the portlets by value (as opposed to keeping the exported portlets on the producer somehow).
    `webappName` - the name of the web app
    `httpRequest` - the HttpServletRequest
    `httpResponse` - the HttpServletResponse
    `servletContext` - the servlet context.
  Throws
    `BulkPortletManagerException`

### importPortlets

    com.bea.wsrp.consumer.management.portlet.ImportPortletsResponseImpl importPortlets(String producerHandle,
                                                                                       ExportedPortlets exportedPortlets,
                                                                                       Map<PortletInstanceId,String> receivingProxyPortlets,
                                                                                       String webappName,
                                                                                       javax.servlet.http.HttpServletRequest httpRequest,
                                                                                       javax.servlet.http.HttpServletResponse httpResponse,
                                                                                       javax.servlet.ServletContext servletContext)
                                                                                       throws IllegalArgumentException,
                                                                                              BulkPortletManagerException

  Performs a bulk portlet import operation, importing portlet state and preference information from previously exported portlets.

  Please note that proxy portlet instances' state change flag will NOT be updated as a result of this operation- this can be done (if desired) before or after the call to importPortlets.

  Parameters
    `producerHandle` - the handle for the producer to import to.
    `exportedPortlets` - the previously-exported portlets to import.
    `receivingProxyPortlets` - a map of portlet instance IDs (as keys) of the proxy portlets to "receive" the imported portlet instances, where the String value is the portlet handle the portlet was exported under (in the ExportedPortlets object). As the portlets are imported, the proxy portlets (specified as the key in this map) will have their portlet handles updated to the newly created imported portlets' portlet handles. In addition, the proxy portlets' producer handles and producerOfferedPortlet state will be updated as appropriate. If the map is null or empty, no proxy portlets will be updated but the import operation still proceeds. Portlets which fail to import properly will NOT be assigned to proxy portlets-- only portlets which import successfully will be mapped.

    If the map contains portlet handles for portlets which do not exist in the ExportedPortlets object, an IllegalArgumentException is thrown.
    `webappName` - the name of the web app
    `httpRequest` - the HttpServletRequest
    `httpResponse` - the HttpServletResponse
    `servletContext` - the servlet context.
  Throws
    `IllegalArgumentException` - if the map of receiving proxy portlets contains any portlet handles not contained in the exported portlets.
    `BulkPortletManagerException`

### releaseExport

    void releaseExport(String producerHandle,
                       ExportedPortlets export)

  Indicates to the Producer that it no longer needs to maintain any stored artifacts relative to a particular export, if the producer stored any such artifacts.

  Parameters
    `producerHandle` - the handle for the producer that was exported from.
    `export` - the previously-exported portlets to release.

### exportPortlets

    ExportPortletsResponse exportPortlets(String producerHandle,
                                          List<PortletInstanceId> portlets,
                                          boolean exportByValueRequired,
                                          String webappName)
                                          throws BulkPortletManagerException

  Performs a bulk portlet export operation, exporting portlet state and preference information from the specified producer's portlet instances in a form which may be subsequently imported to the producer. This form of the method does not require HttpServletRequest, but if it is available the other form of the method should be used whenever possible.

  To be safe, always limit export request batch sizes to be less than the producer's recommended size or use the getExportBatchSize() method to ensure that the actual request batch sent to the producer is smaller than the producer's recommended size. If the producer does not specify a recommended export size, remember that unreasonably large batch sizes may result in transaction and transport timeout errors, so limiting export batches to a reasonable size is always a good idea.

  Parameters
    `producerHandle` - the handle for the producer to export from.
    `portlets` - the list of portlets (associated with proxy portlets) to export. This list should not be larger than the producer's recommended export batch size or a ExportBatchTooLargeException may be thrown. To determine the maximum recommended export batch size for a producer, get the producer's service description from the com.bea.wsrp.consumer.management.producer.ProducerManager getProducerServiceDescription() method and then determine the maximum batch size from IServiceDescription.getRecommendedExportBatchSize()
    `exportByValueRequired` - if `true`, the producer is required to export the portlets by value (as opposed to keeping the exported portlets on the producer somehow).
    `webappName` - the name of the web app
  Throws
    `BulkPortletManagerException`

### importPortlets

    ImportPortletsResponse importPortlets(String producerHandle,
                                          ExportedPortlets exportedPortlets,
                                          Map<PortletInstanceId,String> receivingProxyPortlets,
                                          String webappName)
                                          throws IllegalArgumentException,
                                                 BulkPortletManagerException

  Performs a bulk portlet import operation, importing portlet state and preference information from previously exported portlets. This form of the method does not require HttpServletRequest, but if it is available the other form of the method should be used whenever possible.

  Please note that proxy portlet instances' state change flag will NOT be updated as a result of this operation- this can be done (if desired) before or after the call to importPortlets.

  Parameters
    `producerHandle` - the handle for the producer to import to.
    `exportedPortlets` - the previously-exported portlets to import.
    `receivingProxyPortlets` - a map of portlet instance IDs (as keys) of the proxy portlets to "receive" the imported portlet instances, where the String value is the portlet handle the portlet was exported under (in the ExportedPortlets object). As the portlets are imported, the proxy portlets (specified as the key in this map) will have their portlet handles updated to the newly created imported portlets' portlet handles. In addition, the proxy portlets' producer handles and producerOfferedPortlet state will be updated as appropriate. If the map is null or empty, no proxy portlets will be updated but the import operation still proceeds. Portlets which fail to import properly will NOT be assigned to proxy portlets-- only portlets which import successfully will be mapped.

    If the map contains portlet handles for portlets which do not exist in the ExportedPortlets object, an IllegalArgumentException is thrown.
    `webappName` - the name of the web app
  Throws
    `IllegalArgumentException` - if the map of receiving proxy portlets contains any portlet handles not contained in the exported portlets.
    `BulkPortletManagerException`

### isExportSupported

    boolean isExportSupported(String producerHandle,
                              String webappName,
                              javax.servlet.http.HttpServletRequest httpRequest,
                              javax.servlet.http.HttpServletResponse httpResponse,
                              javax.servlet.ServletContext servletContext)
                              throws BulkPortletManagerException

  Test whether the producer supports the export operation

  Parameters
    `producerHandle` - the handle for the producer to test.
    `webappName` - the name of the web application
    `httpRequest` - the HttpServletRequest
    `httpResponse` - the HttpServletResponse
    `servletContext` - the servlet context.
  Returns
    true if the Producer is a WSRP 2.0 (or later) producer and it supports export
  Throws
    `BulkPortletManagerException` - if support cannot be determined

### isImportSupported

    boolean isImportSupported(String producerHandle,
                              String webappName,
                              javax.servlet.http.HttpServletRequest httpRequest,
                              javax.servlet.http.HttpServletResponse httpResponse,
                              javax.servlet.ServletContext servletContext)
                              throws BulkPortletManagerException

  Test whether the producer supports the import operation

  Parameters
    `producerHandle` - the handle for the producer to test.
    `webappName` - the name of the web application
    `httpRequest` - the HttpServletRequest
    `httpResponse` - the HttpServletResponse
    `servletContext` - the servlet context.
  Returns
    true if the Producer is a WSRP 2.0 (or later) producer and it supports import
  Throws
    `BulkPortletManagerException` - if support cannot be determined

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved