| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyBrokerService
This interface is for use by portlets written to the IBM portlet API. An analogous
interface, com.ibm.portal.propertybroker.service.PropertyBrokerService
is available for portlets written to the JSR-168 API.
The public interface provided by the Property Broker service.
It provides methods for the portlet to publish property changes,
programmatically activate or deactivate actions for a session,
programmatically register action
sets or property sets, and to programmatically generate Click-to-Action menus.
For simple uses of Click-to-Action, this interface need not be used; the portlet
can register actions and properties by declaring them in a WSDL file, and Click-to-Action
menus can be generated by using JSP tags from a custom tag library.
The PropertyBrokerService
interface is implemented by a PortletService.
The following code fragment is an example of how a reference to the PropertyBrokerService
may be obtained:
PropertyBrokerService pbService = null;
PortletConfig portletConfig = null;
...
//portletConfig must have been initialized to the PortletConfig for this portlet
try {
pbService = (PropertyBrokerService) portletConfig.getContext().getService(PropertyBrokerService.class);
} catch(Exception e) {
//handle exception
}
Method Summary | |
---|---|
void | activateActions(PortletRequest request,
PortletSettings settings,
java.lang.String[] actionNames)
Deprecated. Actions which are not automatically activated upon portlet startup are activated explicitly using this call. |
boolean | areCrossPageWiresActive(PortletRequest request,
Property property)
Deprecated. Returns true if cross page wires exist with the specified property and the calling portlet entity as the source, and at least one of the wires is to an active target. |
boolean | areWiresActive(PortletRequest request,
Property property)
Deprecated. Returns true if wires exist with the specified property and the calling portlet entity as the source, and at least one of the wires is to an active target. |
void | changedProperties(PortletRequest request,
PortletConfig config,
PropertyValue[] properties)
Deprecated. Publishes changes in properties. |
void | clearSessionState(PortletSession session)
Deprecated. Reverts the state of all actions which were programmatically activated or deactivated for the current session using the activateActions or deactivateActions calls.
|
void | deactivateActions(PortletRequest request,
PortletSettings settings,
java.lang.String[] actionNames)
Deprecated. Actions which are active for the session are deactivated using this call. |
java.lang.String | generateActionTriggerControl(PortletRequest request,
PortletResponse response,
PropertyValue[] properties,
java.lang.String caption,
java.lang.String description)
Deprecated. Returns markup to generate a Click-to-Action menu for triggering actions which can process any one of the set of properties passed to this method. |
java.lang.String | generateActionTriggerControl(PortletRequest request,
PortletResponse response,
PropertyValue property,
boolean broadcast)
Deprecated. Returns markup for displaying a Click-to-Action menu for triggering actions which can process the property passed to this method. |
Action[] | getActions(PortletRequest request,
PortletSettings settings)
Deprecated. |
ActionTriggerMarkup | getActionTriggerMarkup(PortletRequest request,
PortletResponse response,
PropertyValue[] properties,
java.lang.String caption,
java.lang.String description)
Deprecated. Returns an interface allowing access to markup to generate a Click-to-Action menu for triggering actions which can process any one of the set of properties passed to this method. |
ActionTriggerMarkup | getActionTriggerMarkup(PortletRequest request,
PortletResponse response,
PropertyValue property,
boolean broadcast)
Deprecated. Returns an interface allowing access to markup for displaying a Click-to-Action menu for triggering actions which can process the property passed to this method. |
Action[] | getActiveActions(PortletRequest request,
PortletSettings settings)
Deprecated. Returns an array of Action objects which are registered for this portlet and are currently active. |
Action[] | getAllActions(PortletRequest request,
PortletSettings settings)
Deprecated. Returns all the actions (active or inactive) registered by the calling portlet. |
Property[] | getAllProperties(PortletRequest request,
PortletSettings settings)
Deprecated. Returns all the properties registered by the calling portlet. |
Property[] | getProperties(PortletRequest request,
PortletSettings settings)
Deprecated. |
boolean | isWired(PortletRequest request,
Property property)
Deprecated. Returns true if wires exist with the specified property and the calling portlet entity as the source. |
boolean | isWiredAcrossPages(PortletRequest request,
Property property)
Deprecated. Returns true if cross page wires exist with the specified property and the calling portlet entity as the source. |
void | registerActions(PortletRequest request,
PortletSettings portletSettings,
Action[] actions)
Deprecated. Registers an array of Actions for a given portlet with the
PropertyBrokerService .
|
void | registerProperties(PortletRequest request,
PortletSettings settings,
Property[] properties)
Deprecated. Registers the properties which are produced or consumed by the portlet. |
void | unregisterActions(PortletRequest request,
PortletSettings portletSettings)
Deprecated. Unregisters all previously registered actions for the specified portlet. |
void | unregisterProperties(PortletRequest request,
PortletSettings settings)
Deprecated. Unregisters all properties which are currently registered on behalf of the portlet. |
Method Detail |
---|
void registerProperties(PortletRequest request, PortletSettings settings, Property[] properties) throws PropertyBrokerServiceException, InvalidPropertyException
registerActions
, the associated properties
will be automatically registered also.
This method need only be called to register properties which are not associated with
actions, i.e. by portlets implementing PropertyListener.
This call needs to be made
once only after the portlet is installed, the property set is then
stored persistently for the portlet. Subsequent calls will update and/or
add to the existing property set.
void unregisterProperties(PortletRequest request, PortletSettings settings) throws PropertyBrokerServiceException
void registerActions(PortletRequest request, PortletSettings portletSettings, Action[] actions) throws PropertyBrokerServiceException
Actions
for a given portlet with the
PropertyBrokerService
. Each action must have a unique name.
The registration happens automatically
when the portlet is initialized, if a WSDL file describing
the actions has been provided. The actions are made available for invocation
using Click-to-Action and as the target of wires from other portlets.
Any properties associated with the actions which have not been
registered earlier are automatically registered. Any actions registered
earlier will be removed. Actions registered once are stored persistently
as long as the portlet remains installed in the portal; hence, a check should
be made if actions have already been registered using the getAllActions
method
before invoking this method.
Actions registered are applicable for all instances of the calling portlet on all pages.
So this call should usually be made very early in a portlet's lifecycle.
void unregisterActions(PortletRequest request, PortletSettings portletSettings) throws PropertyBrokerServiceException
void changedProperties(PortletRequest request, PortletConfig config, PropertyValue[] properties) throws IllegalStateException, PropertyBrokerServiceException
beginEventPhase
method
of the EventPhaseListener interface,
the actionPerformed
method of the ActionListener interface,
and the setProperties
method of the PropertyListener interface.
All properties must have been registered earlier, implicitly or explicitly.
A simpler alternative to explicitly invoking this method is
often applicable: declare output parameters for registered
actions (either programmatically or via a WSDL declaration), in which case the action
may bind the values of the output parameters on invocation, and the runtime will
transfer the values as if the changedProperties
method
had been explicitly invoked.
java.lang.String generateActionTriggerControl(PortletRequest request, PortletResponse response, PropertyValue property, boolean broadcast) throws PropertyBrokerServiceException
encodeProperty
Click-to-Action JSP tag. It may be used to generate Click-to-Action menus when it is
not possible to use JSPs.
String
containing the markup
java.lang.String generateActionTriggerControl(PortletRequest request, PortletResponse response, PropertyValue[] properties, java.lang.String caption, java.lang.String description) throws PropertyBrokerServiceException
encodeProperties
Click-to-Action JSP tag. It may be used to generate Click-to-Action menus when it is
not possible to use JSPs.
generateActionTriggerControl
method for details on the markup generated.
ActionTriggerMarkup getActionTriggerMarkup(PortletRequest request, PortletResponse response, PropertyValue property, boolean broadcast) throws PropertyBrokerServiceException
generateActionTriggerControl
method,
but returns the markup in a form that may be embedded with custom
elements, rather than the standard icon that is provided. Allows
the generated Click-to-Action menu to be associated with arbitrary clickable elements
in the markup generated by the portlet.
ActionTriggerMarkup getActionTriggerMarkup(PortletRequest request, PortletResponse response, PropertyValue[] properties, java.lang.String caption, java.lang.String description) throws PropertyBrokerServiceException
generateActionTriggerControl
method,
but returns the markup in a form that may be embedded with custom
elements, rather than the standard icon that is provided. Allows
the generated Click-to-Action menu to be associated with arbitrary clickable elements
in the markup generated by the portlet.
Property[] getAllProperties(PortletRequest request, PortletSettings settings) throws PropertyBrokerServiceException
registerProperties
multiple
times.
Property[] getProperties(PortletRequest request, PortletSettings settings) throws PropertyBrokerServiceException
getAllProperties
instead.
Action[] getActiveActions(PortletRequest request, PortletSettings settings) throws PropertyBrokerServiceException
Action[] getActions(PortletRequest request, PortletSettings settings) throws PropertyBrokerServiceException
getActiveActions
instead.
Action[] getAllActions(PortletRequest request, PortletSettings settings) throws PropertyBrokerServiceException
registerActions
multiple
times.
void activateActions(PortletRequest request, PortletSettings settings, java.lang.String[] actionNames) throws PropertyBrokerServiceException
void deactivateActions(PortletRequest request, PortletSettings settings, java.lang.String[] actionNames) throws PropertyBrokerServiceException
void clearSessionState(PortletSession session) throws PropertyBrokerServiceException
activateActions
or deactivateActions
calls.
i.e, resets the state of all actions to their default state on initialization (active or
inactive).
boolean isWired(PortletRequest request, Property property) throws PropertyBrokerServiceException
boolean isWiredAcrossPages(PortletRequest request, Property property) throws PropertyBrokerServiceException
boolean areWiresActive(PortletRequest request, Property property) throws PropertyBrokerServiceException
boolean areCrossPageWiresActive(PortletRequest request, Property property) throws PropertyBrokerServiceException
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |