Configure the external authentication plug-in as described in Search for the plug-in configuration entries created by the configuration tool in

17-20 Oracle Fusion Middleware Administrators Guide for Oracle Directory Integration Platform public SampleReader Connector conn { superconn; } Get the last change key value param boolean Operation is successfailure return Object lastkeyvalue to be stored public Object getLastChangeKeyboolean val { if val == false { int nval = Integer.parseIntmReadChangeNum; if nval 0 { nval--; } mReadChangeNum = String.valueOfnval; } return mReadChangeNum; } Initializes required values from hashtable passed from Profile param Connector connection details with credentials param Hashtable with the required parameters throws ODIException Indicating connection failure public void initialiseConnector conn,Hashtable pHash throws ODIException { m_logger.finest Entry: SampleReaders.initialise; setValuesconn; mMapRules = MapRulespHash.getConstants.MAPRULE_STR; readCtx = connect; pHash.putREADCONTEXT, readCtx; pHash.putConstants.READERCHANGEKEY_STR, Constants.CHANGE_NUM; String key = StringpHash.getConstants.LASTAPPLIEDCHG_STR; String val = null; if key = null val = StringpHash.getkey; if val = null mAppliedChangeNum = Integer.parseIntStringpHash.getkey; mReadChangeNum = StringpHash.getkey; pHash.putkey, mReadChangeNum; mFilter = DISFilterInterfacepHash.getConstants.MATCHRULE_STR; mAvailableChangeNum = Integer.parseIntinitAvailableChgKey; mSaveLastChgNum = mAppliedChangeNum; try { SearchControls pControls = new SearchControls; pControls.setSearchScopeSearchControls.OBJECT_SCOPE; pControls.setReturningAttributesmRetAttribs; Configuring Synchronization with a Third-Party Directory 17-21 pControls.setTimeLimit3000000; mEnumerate = mLdapCtx.search,objectclass=,pControls; while mEnumerate.hasMoreElements { mResult = SearchResultmEnumerate.nextElement; mAttribs = mResult.getAttributes; } END INFEASIBLE ConfigReader configInfo = ConfigReader pHash.getConstants.CONFINFO_ STR; if configInfo = null { mUpdateSearchCount = configInfo.getUpdateSearchCount; mSearchDelta = configInfo.getSearchDeltaSize; } } catch Exception ex BEGIN INFEASIBLE { throw new ODIExceptionODIException.LDAP_INITIALIZATION_EXCEPTION,ex; } END INFEASIBLE m_logger.finest Exit: SampleReaders.initialise; } Search the changelog throws ODIException public int searchChanges throws ODIException { int temp; int searchDelta = int mSearchDelta; if mAvailableChangeNum = mAppliedChangeNum return -1; int minChgNum = mAppliedChangeNum+1; if mAvailableChangeNum - mAppliedChangeNum = searchDelta temp = mAppliedChangeNum + searchDelta; else temp = mAvailableChangeNum; String searchF = ; if mFilter = null { searchF = mFilter.getSearchFilter; m_logger.logODLLevel.NOTIFICATION,SEARCHF, searchF ; } StringBuffer filter = new StringBuffer300; SearchChanges is called to get all changes try { mEnumerate = mReadCtx.search filter.toString; 17-22 Oracle Fusion Middleware Administrators Guide for Oracle Directory Integration Platform } catch Exception ex BEGIN INFEASIBLE { throw new ODIExceptionODIException.LDAP_SEARCH_EXCEPTION, ex ; } finally { m_logger.logODLLevel.NOTIFICATION, SEARCH_SUCCESSFUL ,new Integer temp ; mAppliedChangeNum = temp; return mErrorCode; } public boolean hasMore throws ODIException { boolean retval = false; int count =0; try { if mEnumerate.hasMoreElements { retval = true; } else { while mAvailableChangeNum mAppliedChangeNum { if count = mUpdateSearchCount break; searchChanges; count++; if mEnumerate.hasMoreElements { retval = true; break; } else mReadChangeNum = String.valueOfmAppliedChangeNum; } } } catch Exception ex BEGIN INFEASIBLE { throw new ODIExceptionODIException.LDAP_HASMORE_EXCEPTION,ex; } END INFEASIBLE if retval == false { no more results mReadChangeNum = new IntegermAvailableChangeNum.toString; } return retval; } Read the next change from the source Configuring Synchronization with a Third-Party Directory 17-23 return Object the header part of the changes read. public Object getNextChange throws ODIException { try { if mEnumerate.hasMoreElements { mResult = SearchResultmEnumerate.nextElement; mAttribs = mResult.getAttributes; } catch Exception e BEGIN INFEASIBLE { throw new ODIException ODIException.LDAP_GETNEXT_EXCEPTION, e; } END INFEASIBLE return mAttribs; } Create the change record from the data read from the file. returns ChangeRecord public ChangeRecord createChangeRecordString dn throws ODIException { Create the changerecord based on the mAttribs which contains all the attributes. } public String initAvailableChgKey throws ODIException { set the available changekey value. This reads the value equivalent to the latest changelog number in the ldap world. } }

17.4.2 Outbound Connectors

Perform the following steps to write an outbound connector: 1. Implement the Writer. The Writer generally extends the target system connector class and implements the DISWriteInterface. The different methods of the DISWriteInterface are specified in its the javadoc. Refer to Sample Writer to see an example Reader implementation. 2. Create a sample config file. The following is a typical config file: [INTERFACEDETAILS] Reader: Complete_classname_including_packageName