Package com.ibm.di.connector
Class ChangelogConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- com.ibm.di.connector.LDAPConnector
-
- com.ibm.di.connector.ChangelogConnector
-
- All Implemented Interfaces:
ConnectorInterface
,VersionInfoInterface
- Direct Known Subclasses:
IDSChangelogConnector
,NetscapeChangelogConnector
,ZOSChangelogConnector
public class ChangelogConnector extends LDAPConnector
ChangelogConnector class combines the similar changelog behavior of IDSChangelogConnector, NetscapeChangelogConnector and z/OS Changelog Connector classes. It provides tree different ways to handle merging between original and updated data.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
bothSeparated
A flag that tells whether theparseEntry(Entry)
method should add the passed as parameter entry as an attribute of the parsed entry.protected boolean
defaultMerge
A flag that tells whether theparseEntry(Entry)
method should merge the parsed entry with the passed as parameter entry.protected LDIFParser
mLdifParser
TheLDIFParser
object used for parsing the entries.protected boolean
onlyChanges
A flag that tells whether theparseEntry(Entry)
method should merge the operation of the parsed entry with the operation of the passed as parameter entry.static java.lang.String
PARAM_MERGE_MODE
The parameter name used to control the way theparseEntry(Entry)
method merges the parsed entry with the provided as a parameter entry.-
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
-
-
Constructor Summary
Constructors Constructor Description ChangelogConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getVersion()
Version information.void
initialize(java.lang.Object aObject)
Initialize the Connector, connect to the LDAP Serverprotected Entry
parseEntry(Entry aEntry)
Method for parsing and merging Changelog Entry attributes and changed attributes from the actual Directory Entry.java.lang.Object
querySchema(java.lang.Object source)
Query the schema of the LDAP server.-
Methods inherited from class com.ibm.di.connector.LDAPConnector
addAttributeValue, at2entry, callErrorHookOnAttributeInUseException, compare, compare, deleteEntry, entry2at, findEntry, flagSet, formatSearchValue, getAttributeSyntax, getCallErrorHook, getCurrentEntry, getLdapContext, getNextEntry, getServerControls, getServerInfo, isDeltaSupported, isExceptionFatal, isServerAdminControl, mapAttributeSyntax, modEntry, modEntry, moveEntry, putEntry, queryNamingContexts, queryObjectClassAttributes, rebind, rebind, removeAllAttributeValues, removeAttributeValue, replaceAttributeValue, replaceAttributeValueProxy, selectEntries, setADPassword, setServerAdminControl, setSortControl, setsubtreeDeleteSupported, showServerInfo, supportsControl, supportsExtension, supportsPagedResults, supportsPersistantSearch, supportsSorting, supportsVirtualListView, terminate
-
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, extractExceptionInformation, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isIOException, logError, logmsg, pushback, queryOperations, queryReply, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminateServer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isIOException, pushback, queryOperations, queryReply, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer
-
-
-
-
Field Detail
-
defaultMerge
protected boolean defaultMerge
A flag that tells whether theparseEntry(Entry)
method should merge the parsed entry with the passed as parameter entry.
This flag is controlled by the the value of thePARAM_MERGE_MODE
parameter and set during the initialization process (initialize(Object)
).
-
onlyChanges
protected boolean onlyChanges
A flag that tells whether theparseEntry(Entry)
method should merge the operation of the parsed entry with the operation of the passed as parameter entry.
This flag is controlled by the the value of thePARAM_MERGE_MODE
parameter and set during the initialization process (initialize(Object)
).
-
bothSeparated
protected boolean bothSeparated
A flag that tells whether theparseEntry(Entry)
method should add the passed as parameter entry as an attribute of the parsed entry.
This flag is controlled by the the value of thePARAM_MERGE_MODE
parameter and set during the initialization process (initialize(Object)
).
-
mLdifParser
protected LDIFParser mLdifParser
TheLDIFParser
object used for parsing the entries.
-
PARAM_MERGE_MODE
public static final java.lang.String PARAM_MERGE_MODE
The parameter name used to control the way theparseEntry(Entry)
method merges the parsed entry with the provided as a parameter entry.- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(java.lang.Object aObject) throws java.lang.Exception
Initialize the Connector, connect to the LDAP Server- Specified by:
initialize
in interfaceConnectorInterface
- Overrides:
initialize
in classLDAPConnector
- Parameters:
aObject
- An Object sent to the initialize method, ignored.- Throws:
java.lang.Exception
- Any Exception by the underlying methods to connect to the LDAP Server
-
parseEntry
protected Entry parseEntry(Entry aEntry) throws java.lang.Exception
Method for parsing and merging Changelog Entry attributes and changed attributes from the actual Directory Entry.- Parameters:
aEntry
- the actual Directory Entry.- Returns:
- the result of the parsing and merging operations entry.
- Throws:
java.lang.Exception
- if an error occurs.
-
querySchema
public java.lang.Object querySchema(java.lang.Object source) throws java.lang.Exception
Query the schema of the LDAP server. If 'Start at' parameter is EOD return schema depending on the Merge mode parameter:
- Merge changelog and changed data - return all 'MAY' and 'MUST' attributes defined for 'changeLogEntry' LDAP object class
- Return only changed data - we have no idea what are the changed attributes of the changed entry so return
null
- Return both - return the 'changelog' attribute
If 'Start at' parameter is set to a number the LDAP Connector querySchema is called.- Specified by:
querySchema
in interfaceConnectorInterface
- Overrides:
querySchema
in classLDAPConnector
- Parameters:
source
- A distinguished name- Returns:
- The schema
- Throws:
java.lang.Exception
- Any Exception thrown by underlying libraries- See Also:
Entry
,Vector
-
getVersion
public java.lang.String getVersion()
Version information.- Specified by:
getVersion
in interfaceVersionInfoInterface
- Overrides:
getVersion
in classLDAPConnector
- Returns:
- the version information.
-
-