ShowTable of Contents
This sample provides a custom builder for Portlet Factory to allow interaction with an LDAP server. This sample provides direct access to any LDAP server, not necessarily the one used by the WebSphere Portal server. (There are some techniques available that can easily facilitate the use of the WebSphere Portal PUMA API within Portlet Factory.)
This sample provides a new builder for Portlet Factory called the LDAP builder. The LDAP builder allows for interaction with an LDAP server by providing the following functions:
The builder requires only a few inputs to specify the connection parameters to the LDAP server.
It will automatically generate a schema in the model based on the LDAP schema for the provided LDAP objectClass. There are some additional builder inputs which control the generation of the schema.
Here is a screen shot of the Builder Call Editor for the LDAP builder.
The LDAP builder creates the following artifacts in the model:
The Schema generated by the LDAP builder looks something like this - each LDAP attribute is represented by an element in the Schema:
This sample portlet shows the LDAP builder in use. It uses a service provider model (LdapService.model) and a service consumer model (LdapPortlet.model). The service provider model uses the LDAP builder and exposes both the search and update operations. The service consumer model uses a View and Form builder to display the results from the LDAP builder and provide capabilities for editing the LDAP data. To run this sample, you will need to update the inputs to the LDAP builder in the LdapService.model file to connect to your LDAP server.
This section contains some screen shots of the portlet.
The input page, here we search for all users under o=ibm,c=us with a surname of smith:
The list page, here the results from the LDAP builder are displayed:
The detail page, here the details for a single LDAP object are displayed:
The update page, here the LDAP object can be updated:
Notes on running the sample and prerequisites
Import the attached zip file(s) into your project using the Import WebSphere Portlet Factory Archive command.
Download the builder from here: ldap_builder_v2.zip
Download the sample portlet from here: ldap_sample.zip