com.ibm.tivoli.maximo.oslc.provider.bus

Class LDAPSearchHandler

  • All Implemented Interfaces:
    ResourceHandler


    public class LDAPSearchHandler
    extends BaseResourceHandler
    Perform LDAP Search Search can be perform 2 ways: 1. using LDAP Cron task to get all parameters (cron task have to be setup first. It does not have to be active) The where clause will look as following (values are example) oslc.where=spi:taskInstance="LDAPSYNC01" and spi:taskName="LDAPSYNC" and spi:search="user" (spi:search can be "user" or "group") 2. Using passed parameters The where clause will look as following (values are example) oslc.where=spi:host="qalab07.swg.usma.ibm.com" and spi:port="389" and spi:sslEnabled="0" and spi:principal="wasadmin" and spi:credential="wasadmin" and spi:baseDN="OU=SWG,DC=qalab07ldap,DC=swg,DC=usma,DC=ibm,DC=com" and spi:searchFilter="(&(objectCategory=*)(objectClass=user))" and spi:searchScope="subtree" and spi:attrs="sAMAccountName, givenName, sn, displayName, streetAddress, homePhone, memberOf, telephoneNumber, mail, st, postalCode, c, l" It can work both for user and group search
    • Constructor Detail

      • LDAPSearchHandler

        public LDAPSearchHandler(BusResourceInfo resInfo,
                                 java.lang.String contextURI)
    • Method Detail

      • createSearchLdapContext

        protected javax.naming.ldap.LdapContext createSearchLdapContext(LdapContextSettings settings)
                                                                 throws javax.naming.NamingException
        Creates a LDAP context to be used for searches. This method, by default returns the default context. The concrete implementations can override this method to use a different context (may be a different port) for searches.
        Returns:
        context to be used for search operations.
        Throws:
        javax.naming.NamingException
      • getUserSearchControls

        protected javax.naming.directory.SearchControls getUserSearchControls(java.lang.String searchScope,
                                                                              java.lang.String[] attributes)
        Returns the search controls used for user searches.
        Returns:
        the search controls used for user searches.
      • loadSyncParamters

        protected LoadSyncSettings loadSyncParamters(java.lang.String taskName,
                                                     java.lang.String instanceName)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns the search controls used for user searches.
        Returns:
        the search controls used for user searches.
        Throws:
        MXException
        java.rmi.RemoteException