Class ADChangelogConnector

  • All Implemented Interfaces:
    ConnectorInterface, VersionInfoInterface

    public class ADChangelogConnector
    extends LDAPConnector
    implements ConnectorInterface
    The class ADChangelogConnector represents the Active Directory Changelog connector class that will be accessed by IBM Tivoli Directory Integrator. It extends the LDAP connector class (LDAPConnector) and overrides some of its methods to implement AD-specific functionality.
    • Constructor Detail

      • ADChangelogConnector

        public ADChangelogConnector()
        Calls the super constructor and assigns supported Connector modes.
    • Method Detail

      • initialize

        public void initialize​(java.lang.Object aObj)
                        throws java.lang.Exception
        Reads connector parameters' values and prepares LDAP search constraints.
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class LDAPConnector
        Parameters:
        aObj - This parameter is usually null but can be any type of object the caller chooses to pass on. Normally the parameter is some kind of input stream or Reader object. This Connector ignores this parameter.
        Throws:
        java.lang.Exception - If invalid Connector parameter values are supplied.
      • getStartUsnValues

        protected void getStartUsnValues()
                                  throws java.lang.Exception
        Reads start USN values. Sources for start USN values are checked in this order:

        (1) File name parameter is specified - backward compatibility mode;

        (2) Persistent parameter - if the specified parameter is not found in the store, the "Start at" value is used.
        The method will reset the USN Parameters (using the setZeroUsnValues() private method) if the USN properties file does not exists, could not be read or the properties in it could be parsed.

        Throws:
        java.lang.Exception - if an error working with the USN properties occurs.
      • selectEntries

        public void selectEntries()
                           throws java.lang.Exception
        Reads the initial USN values from file and sets necessary request controls.
        Specified by:
        selectEntries in interface ConnectorInterface
        Overrides:
        selectEntries in class LDAPConnector
        Throws:
        java.lang.Exception - If cannot obtain the highestCommitedUsn from Active Directory.
      • getHighestCommittedUsn

        protected int getHighestCommittedUsn()
                                      throws java.lang.Exception
        Retrieves the highest committed USN from Active Directory.
        Returns:
        The Active Directory's "highestCommittedUsn" Attribute.
        Throws:
        java.lang.Exception - If cannot retrieve the highest committed USN number.
      • binaryGUIDtoString

        protected java.lang.String binaryGUIDtoString​(byte[] aBinaryData)
        Generates the hexadecimal String representation of the GUID based on its 128-bit binary representation. The String representation of a GUID has the form "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}". The digits used are the hexadecimal digits 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E and F.
        Parameters:
        aBinaryData - A 16-byte byte array, holding the 128-bit binary representation of the GUID.
        Returns:
        The hexadecimal String representation of the binary GUID.
      • addGUIDStrAttribute

        protected void addGUIDStrAttribute​(Entry aEntry)
        Adds the "objectGUIDStr" Attribute to the Entry. The value of this Attribute is set to the String representation of the binary value of this Entry's "objectGUID" Attribute.
        Parameters:
        aEntry - The Entry to add the "objectGUIDStr" Attribute to.
      • retrieveEntry

        protected Entry retrieveEntry​(java.lang.String aFilter)
                               throws javax.naming.NamingException
        Retrieves an Entry from AD based on the given filter.
        Parameters:
        aFilter - The LDAP filter for retrieving the Entry.
        Returns:
        The first Entry that matched the filter; "null" if no AD Entry matches the filter.
        Throws:
        javax.naming.NamingException - If error occurs while retrieving the Entry from Active Directory.
      • packUsnValues

        protected Entry packUsnValues()
        Returns:
        an Entry containing the current Connector's USN values as properties. Such Entries are used for storage in the persistent store.
      • storeUSNForNextSynch

        protected void storeUSNForNextSynch()
        Stores the USN values for the next synchronization.
      • getUsnValues

        public Entry getUsnValues()
        Retrives USN synchronization values.
        Returns:
        an Entry object containing the current USN synchronization values.
      • setUsnValues

        public void setUsnValues​(Entry aUsnEntry)
                          throws java.lang.Exception
        Sets the Connector's current USN synchronization values to the values specified in the "aUsnEntry" parameter.
        Parameters:
        aUsnEntry - the Entry object containing the USN values.
        Throws:
        java.lang.Exception - If the given Entry object does not contain the necessary USN values.