Cooperative portlets subscribe to a model for declaring, publishing,
and sharing information with each other using the WebSphere Portal property
broker. Portlets subscribe to the broker by publishing typed data items, or properties,
that they can share, either as a provider or as a recipient. These portlets
may be developed and deployed separately or together and can exchange information
and react in a coordinated manner, thus improving the end-user experience.
Conversely, as portlets are removed, the remaining portlets will still be
able to function correctly and in a coordinated manner. The property broker
is used to facilitate development of portlets that may be dynamically integrated,
without requiring previous coordination at development time.
- The portlet that provides a property is called the source portlet.
- The properties that the source portlet publishes are called output
properties.
- The portlet that receives a property is called the target portlet.
- The properties that are received by the target are called input
properties.
Action processing in target portlets often
does not need to distinguish between an action initiated within its own portlet
area and an action initiated by the transfer of a portlet property value.
Each action is also associated with a single input parameter and zero or more
output parameters. Each parameter is associated with exactly one property.
A parameter provides additional information about how the property value is
transferred to or from the action. Parameters associated with input properties
are called input parameters, while those associated with output properties
are called output parameters.
At runtime, the property broker matches
the data type of output properties from a source portlet with the data type
of input properties from one or more target portlets. If a match is determined,
the portlets are capable of sharing the property. The actual transfer of
the property can be initiated by one of the following methods:
- All portlets
- Using the Customizing pages, a user can create
a persistent connection between two portlets, called a wire. This
allows portlets to exchange properties.
- The source IBM portlet can do a programmatic publish of properties to
the broker when it determines that property values have changed. Such property
values are transferred to the target(s) only if wires have been created. While
only IBM portlets have a programmatic API for publishing, both standard and
IBM portlets can make new property values available to the broker as a side-effect
of actions.
- IBM portlets only
Note: Currently, a standard portlet cannot be wired to an IBM portlet.
Wires can only be created between portlets using the same standard. For example,
standard portlets can only be wired to other standard portlets.
Cooperative
portlets can be source portlets, target portlets, or both.
- Source portlets identify to the property broker properties which they
are able to share with other portlets.
- Target portlets identify to the property broker actions which are able
to process properties contributed by other portlets.