Portlet services
Portlet services are used to provide common functionality to portlets. Each portlet service has its own service-specific interface for the functionality that it offers.
HCL WebSphere Portal supports portlet services for both IBM portlets and standard portlets:
- Standard portlets use a JNDI lookup to retrieve a PortletServiceHome object, used to retrieve a portlet service implementation.
- IBM portlets retrieve portlet services using the PortletContext.getService() method.
A portlet service can be invoked only from within a portlet.
Portlet service interfaces used by standard portlets are different from those used by IBM portlets. We can write our own portlet service and register it in the portal, so that all portlets can use it. Various services may be implemented by different vendors, for example, a SearchService, LocationService, or a MailService.
The following services are available with HCL WebSphere Portal:
- ContentAccessService
- CredentialVaultService
- Model SPI services
- PumaHome
- DynamicUIManagementFactoryService
See
- Access portlet services
Using an example, learn how a standard portlet can retrieve and use a sample portlet service. Accessing a portlet service requires a JNDI lookup for a PortletServiceHome. To use the portlet service, you retrieve a service object from the home, cast it to the service-specific interface and invoke service methods.
- Create our own portlet service
Write a portlet service by defining the interface, writing the service implementation, making the service accessible for IBM portlets, and registering the service.
Parent Develop portlets