com.ibm.portal.propertybroker.service
Interface PropertyBrokerService
public interface PropertyBrokerService
The public interface provided by the Property Broker service.
It provides methods to programmatically activate or deactivate actions for a session and
to determine is a registered property is wired.
The portlet needs to register its properties and actions by declaring them in a WSDL file.
See the WebSphere Portal InfoCenter for the format of the WSDL file.
The PropertyBrokerService
interface is implemented by a PortletService.
A portlet can obtain the service by using JNDI. This is illustrated in the programming
examples section of the InfoCenter and the property broker standard portlet examples shipped
with WebSphere Portal. A boolean guard may be used to guard uses of the PropertyBrokerService
by the portlet; this will enable the portlet to execute correctly in JSR-168 compliant portlet
containers outside of WebSphere Portal.
A snippet of the JNDI lookup code:
boolean pbServiceAvailable = false;
try {
Context ctx = new InitialContext();
PortletServiceHome serviceHome = (PortletServiceHome) ctx.lookup("portletservice/com.ibm.portal.propertybroker.service.PropertyBrokerService");
brokerService = (PropertyBrokerService)serviceHome.getPortletService(com.ibm.portal.propertybroker.service.PropertyBrokerService.class);
pbServiceAvailable = true;
}
catch(Throwable t) {
}
A similar interface, com.ibm.wps.pb.service.PropertyBrokerService
is available for use by portlets written to IBM's portlet API.
- Since:
- 5.1
Method Summary |
void
| ActionRequest, java.lang.String)">activateAction(PortletConfig config,
ActionRequest request,
java.lang.String actionName)
An Action which has been deactivated
is activated explicitly using this call.
|
boolean
| PortletResponse, java.lang.String)">areCrossPageWiresActive(PortletRequest request,
PortletResponse response,
java.lang.String propertyName)
Test to see if a property is currently wired to active actions on other pages.
|
boolean
| areCrossPageWiresActive(PortletRequest request,
java.lang.String propertyName)
Deprecated. use PortletResponse, java.lang.String)">areCrossPageWiresActive(PortletRequest, PortletResponse, String) instead
|
boolean
| PortletResponse, java.lang.String)">areWiresActive(PortletRequest request,
PortletResponse response,
java.lang.String propertyName)
Test to see if a property is currently wired to active actions on this page.
|
boolean
| areWiresActive(PortletRequest request,
java.lang.String propertyName)
Deprecated. use PortletResponse, java.lang.String)">areWiresActive(PortletRequest, PortletResponse, String) instead
|
void
| ActionRequest, java.lang.String)">deactivateAction(PortletConfig config,
ActionRequest request,
java.lang.String actionName)
An Action which is active for the session
is deactivated using this call.
|
boolean
| PortletResponse, java.lang.String)">isWired(PortletRequest request,
PortletResponse response,
java.lang.String propertyName)
Test to see if a property is currently wired on this page.
|
boolean
| isWired(PortletRequest request,
java.lang.String propertyName)
Deprecated. use PortletResponse, java.lang.String)">isWired(PortletRequest, PortletResponse, String) instead
|
boolean
| PortletResponse, java.lang.String)">isWiredAcrossPages(PortletRequest request,
PortletResponse response,
java.lang.String propertyName)
Test to see if a property is currently wired across pages.
|
boolean
| isWiredAcrossPages(PortletRequest request,
java.lang.String propertyName)
Deprecated. use PortletResponse, java.lang.String)">isWiredAcrossPages(PortletRequest, PortletResponse, String) instead
|
ActionRequest, java.lang.String)">
activateAction
void activateAction(PortletConfig config,
ActionRequest request,
java.lang.String actionName)
throws ActivationFailedException
- An Action which has been deactivated
is activated explicitly using this call. This activates the action
for the current session. If the action is already active, this call is a no-op.
Actions are initially active by default; however, actions may be specified to be
initially inactive by specifying a value of
false
for the
activeOnStartup
attribute for the action element in the WSDL file.
Inactive actions may be activated for specific sessions by invoking this method.
Inactive actions which are targets of wires are not invoked even if the wire is triggered
by the source portlet.
This call may only be invoked during the action phase of the portlet.
Refer to the WebSphere Portal InfoCenter for documentation on WSDL syntax and the
activeOnStartup
flag .
- Parameters:
- config - the PortletConfig object
- request - the ActionRequest object
- actionName - the name of the action to be activated
- Throws:
- ActivationFailedException - is thrown if any problem is encountered
- See Also:
- ActionRequest, java.lang.String)">deactivateAction(PortletConfig, ActionRequest, String)
ActionRequest, java.lang.String)">
deactivateAction
void deactivateAction(PortletConfig config,
ActionRequest request,
java.lang.String actionName)
throws DeactivationFailedException
- An Action which is active for the session
is deactivated using this call. If the action is already inactive, the invocation
is a no-op. This deactivates the action
for the current session. If actions are inactive, they will not
be invoked as a result of wires being activated in
the current session. Actions are initially active by default, or may explicitly
be specified to be initially inactive through a setting in the WSDL file, and be activated
in the current session by invoking the
activateAction
method.
This call may only be invoked during the action phase of the portlet.
- Parameters:
- config - the PortletConfig object
- request - the ActionRequest object
- actionName - the name of the action to be deactivated
- Throws:
- DeactivationFailedException - is thrown if any problem is encountered
- See Also:
- ActionRequest, java.lang.String)">activateAction(PortletConfig, ActionRequest, String)
isWired
boolean isWired(PortletRequest request,
java.lang.String propertyName)
throws AccessFailedException
- Deprecated. use PortletResponse, java.lang.String)">isWired(PortletRequest, PortletResponse, String) instead
- Test to see if a property is currently wired on this page.
The knowledge of whether a property is wired may be used by the owning portlet to surface
additional visual elements (such as links) in its markup which can be used by end users to
trigger wired actions.
- Parameters:
- request - the PortletRequest object for the current portlet request
- propertyName - the name of the property to check
- Returns:
- true if the calling portlet entity's specified property is wired to other target actions.
- Throws:
- AccessFailedException - is thrown if any problem is encountered
areWiresActive
boolean areWiresActive(PortletRequest request,
java.lang.String propertyName)
throws AccessFailedException
- Deprecated. use PortletResponse, java.lang.String)">areWiresActive(PortletRequest, PortletResponse, String) instead
- Test to see if a property is currently wired to active actions on this page.
The knowledge of whether a property is wired to active actions
may be used by the owning portlet to surface
additional visual elements (such as links) in its markup which can be used by end users to
trigger wired actions.
- Parameters:
- request - the PortletRequest object for the current portlet request
- propertyName - the name of the property to check
- Returns:
- true is the calling portlet entity's specified property is wired to other target actions
which are currently active.
- Throws:
- AccessFailedException - is thrown if any problem is encountered
isWiredAcrossPages
boolean isWiredAcrossPages(PortletRequest request,
java.lang.String propertyName)
throws AccessFailedException
- Deprecated. use PortletResponse, java.lang.String)">isWiredAcrossPages(PortletRequest, PortletResponse, String) instead
- Test to see if a property is currently wired across pages.
The knowledge of whether a property is wired may be used by the owning portlet to surface
additional visual elements (such as links) in its markup which can be used by end users to
trigger wired actions.
- Parameters:
- request - the PortletRequest object for the current portlet request
- propertyName - the name of the property to check
- Returns:
- true if the calling portlet entity's specified property is wired to other target actions on a different page.
- Throws:
- AccessFailedException - is thrown if any problem is encountered
areCrossPageWiresActive
boolean areCrossPageWiresActive(PortletRequest request,
java.lang.String propertyName)
throws AccessFailedException
- Deprecated. use PortletResponse, java.lang.String)">areCrossPageWiresActive(PortletRequest, PortletResponse, String) instead
- Test to see if a property is currently wired to active actions on other pages.
The knowledge of whether a property is wired to active actions
may be used by the owning portlet to surface
additional visual elements (such as links) in its markup which can be used by end users to
trigger wired actions.
- Parameters:
- request - the PortletRequest object for the current portlet request
- propertyName - the name of the property to check
- Returns:
- true is the calling portlet entity's specified property is wired to cross page target actions
which are currently active.
- Throws:
- AccessFailedException - is thrown if any problem is encountered
PortletResponse, java.lang.String)">
isWired
boolean isWired(PortletRequest request,
PortletResponse response,
java.lang.String propertyName)
throws AccessFailedException
- Test to see if a property is currently wired on this page.
The knowledge of whether a property is wired may be used by the owning portlet to surface
additional visual elements (such as links) in its markup which can be used by end users to
trigger wired actions.
- Parameters:
- request - the PortletRequest object for the current portlet request
- response - the PortletResponse object
- propertyName - the name of the property to check
- Returns:
- true if the calling portlet entity's specified property is wired to other target actions.
- Throws:
- AccessFailedException - is thrown if any problem is encountered
PortletResponse, java.lang.String)">
areWiresActive
boolean areWiresActive(PortletRequest request,
PortletResponse response,
java.lang.String propertyName)
throws AccessFailedException
- Test to see if a property is currently wired to active actions on this page.
The knowledge of whether a property is wired to active actions
may be used by the owning portlet to surface
additional visual elements (such as links) in its markup which can be used by end users to
trigger wired actions.
- Parameters:
- request - the PortletRequest object for the current portlet request
- response - the PortletResponse object
- propertyName - the name of the property to check
- Returns:
- true is the calling portlet entity's specified property is wired to other target actions
which are currently active.
- Throws:
- AccessFailedException - is thrown if any problem is encountered
PortletResponse, java.lang.String)">
isWiredAcrossPages
boolean isWiredAcrossPages(PortletRequest request,
PortletResponse response,
java.lang.String propertyName)
throws AccessFailedException
- Test to see if a property is currently wired across pages.
The knowledge of whether a property is wired may be used by the owning portlet to surface
additional visual elements (such as links) in its markup which can be used by end users to
trigger wired actions.
- Parameters:
- request - the PortletRequest object for the current portlet request
- response - the PortletResponse object
- propertyName - the name of the property to check
- Returns:
- true if the calling portlet entity's specified property is wired to other target actions on a different page.
- Throws:
- AccessFailedException - is thrown if any problem is encountered
PortletResponse, java.lang.String)">
areCrossPageWiresActive
boolean areCrossPageWiresActive(PortletRequest request,
PortletResponse response,
java.lang.String propertyName)
throws AccessFailedException
- Test to see if a property is currently wired to active actions on other pages.
The knowledge of whether a property is wired to active actions
may be used by the owning portlet to surface
additional visual elements (such as links) in its markup which can be used by end users to
trigger wired actions.
- Parameters:
- request - the PortletRequest object for the current portlet request
- response - the PortletResponse object
- propertyName - the name of the property to check
- Returns:
- true is the calling portlet entity's specified property is wired to cross page target actions
which are currently active.
- Throws:
- AccessFailedException - is thrown if any problem is encountered