|
||||||||||
| 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
}
PropertyListener,
PortletService| Method Summary | |
|---|---|
void |
activateActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings,
java.lang.String[] actionNames)
Deprecated. Actions which are not automatically activated upon portlet startup are activated explicitly using this call. |
boolean |
areCrossPageWiresActive(org.apache.jetspeed.portlet.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(org.apache.jetspeed.portlet.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(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletConfig config,
PropertyValue[] properties)
Deprecated. Publishes changes in properties. |
void |
clearSessionState(org.apache.jetspeed.portlet.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(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings,
java.lang.String[] actionNames)
Deprecated. Actions which are active for the session are deactivated using this call. |
java.lang.String |
generateActionTriggerControl(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
Deprecated. |
ActionTriggerMarkup |
getActionTriggerMarkup(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
Deprecated. Returns an array of Action objects which are registered for this portlet and
are currently active. |
Action[] |
getAllActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
Deprecated. Returns all the actions (active or inactive) registered by the calling portlet. |
Property[] |
getAllProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
Deprecated. Returns all the properties registered by the calling portlet. |
Property[] |
getProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
Deprecated. |
boolean |
isWired(org.apache.jetspeed.portlet.PortletRequest request,
Property property)
Deprecated. Returns true if wires exist with the specified property and the calling portlet entity as the source. |
boolean |
isWiredAcrossPages(org.apache.jetspeed.portlet.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(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings portletSettings,
Action[] actions)
Deprecated. Registers an array of Actions for a given portlet with the
PropertyBrokerService. |
void |
registerProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings,
Property[] properties)
Deprecated. Registers the properties which are produced or consumed by the portlet. |
void |
unregisterActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings portletSettings)
Deprecated. Unregisters all previously registered actions for the specified portlet. |
void |
unregisterProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
Deprecated. Unregisters all properties which are currently registered on behalf of the portlet. |
| Method Detail |
|---|
void registerProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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.
request - the PortletRequest object for current portlet requestsettings - the PortletSettings object identifying the calling portletproperties - an array of Property objects
PropertyBrokerServiceException - is thrown for general problems encountered
in registering the properties.
InvalidPropertyException - is thrown if any property is invalid e.g. is missing
a required field.Property
void unregisterProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
throws PropertyBrokerServiceException
request - the PortletRequest object for the current portlet requestsettings - the PortletSettings object identifying the calling portlet
PropertyBrokerServiceException - is thrown if any problem is encountered
void registerActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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.
request - the PortletRequest object identifying the current portlet
requestportletSettings - the PortletSettings object identifying the
calling portletactions - the array of supported actions.
PropertyBrokerServiceException - is thrown if the registration
failed for any reason.Action,
getAllActions(org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletSettings)
void unregisterActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings portletSettings)
throws PropertyBrokerServiceException
request - the PortletRequest object identifying the current portlet
requestportletSettings - the PortletSettings object identifying the
calling portlet
PropertyBrokerServiceException - is thrown if any problem is encountered
void changedProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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.
request - the PortletRequest object for the current requestconfig - the PortletConfig object for the calling portletproperties - an array of PropertyValue objects containing the changed
properties.
IllegalStateException - if invoked outside the event phase
PropertyBrokerServiceException - is thrown if any problem is encounteredPropertyValue,
PropertyListener.setProperties(org.apache.jetspeed.portlet.PortletRequest, com.ibm.wps.pb.property.PropertyValue[]),
ActionListener.actionPerformed(org.apache.jetspeed.portlet.event.ActionEvent),
EventPhaseListener.beginEventPhase(org.apache.jetspeed.portlet.PortletRequest)
java.lang.String generateActionTriggerControl(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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.
request - the PortletRequest object for the current requestresponse - the PortletResponse object for the current requestproperty - a PropertyValue object holding the property and its valuebroadcast - a boolean, if true an additional meta-action to trigger all matching
portlet actions is generated.
String containing the markup
PropertyBrokerServiceException - thrown if any problem is
encountered creating the menu markup
java.lang.String generateActionTriggerControl(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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.
request - the PortletRequest objectresponse - the PortletResponse objectproperties - an array of PropertyValue containing the
descriptions and values of the properties to be passed to the actionscaption - the string which will be used to visually identify to the user
the actions which will be taken.description - a descriptive string expanding on the caption
PropertyBrokerServiceException - thrown if any problem was
encountered creating the markup
ActionTriggerMarkup getActionTriggerMarkup(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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.
request - the PortletRequest object for the current requestresponse - the PortletResponse object for the current requestproperty - a PropertyValue object holding the property and its value
description and valuebroadcast - a boolean, if true an additional meta-action to trigger all matching
portlet actions is generated.
PropertyBrokerServiceException - is thrown if any problem is encounteredActionTriggerMarkup,
generateActionTriggerControl(PortletRequest, PortletResponse,PropertyValue, boolean)
ActionTriggerMarkup getActionTriggerMarkup(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.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.
request - the PortletRequest objectresponse - the PortletResponse objectproperties - an array of PropertyValue containing the
descriptions and values of the properties to be passed to the actionscaption - the string which will be used to visually identify to the user
the actions which will be taken.description - a descriptive string expanding on the caption
PropertyBrokerServiceException - is thrown if any problem is encounteredActionTriggerMarkup,
generateActionTriggerControl(PortletRequest, PortletResponse,PropertyValue[], String, String)
Property[] getAllProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
throws PropertyBrokerServiceException
registerProperties multiple
times.
request - the PortletRequest object for the current portlet requestsettings - the PortletSettings object for the calling portlet
Property objects which are registered for this portlet
PropertyBrokerServiceException - is thrown if any problem is encounteredregisterProperties(org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletSettings, com.ibm.wps.pb.property.Property[])
Property[] getProperties(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
throws PropertyBrokerServiceException
getAllProperties instead.
PropertyBrokerServiceExceptiongetAllProperties(org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletSettings)
Action[] getActiveActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
throws PropertyBrokerServiceException
Action objects which are registered for this portlet and
are currently active. Active actions are ones that will appear in the Click-to-Action
menus and will be triggered when wires to the actions are activated.
request - the PortletRequest object for the current requestsettings - the PortletSettings object for the calling portlet
Action objects which are registered for this portlet and
are currently active
PropertyBrokerServiceException - is thrown if any problem is encountered
Action[] getActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
throws PropertyBrokerServiceException
getActiveActions instead.
PropertyBrokerServiceExceptiongetActiveActions(org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletSettings)
Action[] getAllActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings)
throws PropertyBrokerServiceException
registerActions multiple
times.
request - the PortletRequest object for the current requestsettings - the PortletSettings object for the calling portlet
Action objects which are registered for this portlet
whether they are currently active or not
PropertyBrokerServiceException - is thrown if any problem is encounteredregisterActions(org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletSettings, com.ibm.wps.pb.property.Action[])
void activateActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings,
java.lang.String[] actionNames)
throws PropertyBrokerServiceException
request - the PortletRequest object for the current portlet requestsettings - the PortletSettings object identifying the calling portletactionNames - the names of the actions to be activated
PropertyBrokerServiceException - is thrown if any problem is encountered
void deactivateActions(org.apache.jetspeed.portlet.PortletRequest request,
org.apache.jetspeed.portlet.PortletSettings settings,
java.lang.String[] actionNames)
throws PropertyBrokerServiceException
request - the PortletRequest object for the current portlet requestsettings - the PortletSettings object identifying the calling portletactionNames - the names of the actions to be activated
PropertyBrokerServiceException - is thrown if any problem is encountered
void clearSessionState(org.apache.jetspeed.portlet.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).
session - the current portlet session
PropertyBrokerServiceExceptionactivateActions(org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletSettings, java.lang.String[]),
deactivateActions(org.apache.jetspeed.portlet.PortletRequest, org.apache.jetspeed.portlet.PortletSettings, java.lang.String[])
boolean isWired(org.apache.jetspeed.portlet.PortletRequest request,
Property property)
throws PropertyBrokerServiceException
request - the PortletRequest identifying the callerproperty - the Property
PropertyBrokerServiceException - if any problem is encountered
boolean isWiredAcrossPages(org.apache.jetspeed.portlet.PortletRequest request,
Property property)
throws PropertyBrokerServiceException
request - the PortletRequest identifying the callerproperty - the Property
PropertyBrokerServiceException - if any problem is encountered
boolean areWiresActive(org.apache.jetspeed.portlet.PortletRequest request,
Property property)
throws PropertyBrokerServiceException
request - the PortletRequest identifying the callerproperty - the Property
PropertyBrokerServiceException - if any problem is encountered
boolean areCrossPageWiresActive(org.apache.jetspeed.portlet.PortletRequest request,
Property property)
throws PropertyBrokerServiceException
request - the PortletRequest identifying the callerproperty - the Property
PropertyBrokerServiceException - if any problem is encountered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||