Microsoft Identity Integration Server 2003 Developer Reference

Creating Connected Data Source Extensions

By using a connected data source extension, you can connect data sources to the MIIS server without using the management agents that are included with MIIS.

A connected data source extension is a .NET Framework class library that implements the following interfaces:

Note  If you plan to use Sytem.DriectoryServices to create a connected data source extension, you must use the 1.1 QFE version of the .NET Framework.

This topic contains the following sections:

Interfaces to Implement in a Connected Data Source Extensions

The interfaces to implement depend upon the step type and export modes that are supported by the management agent. The step type and export modes are configured when you create the management agent. The following table shows you the interfaces to implement.

Step types Export modes Interfaces to implement
Import and export Call-based IMAExtensibleFileImport and IMAExtensibleCallExport
Import and export File-based IMAExtensibleFileImport and IMAExtensibleFileExport
Import-only Call-based IMAExtensibleFileImport* and IMAExtensibleCallExport
Import-only File-based IMAExtensibleFileImport* and IMAExtensibleFileExport
Export-only Call-based IMAExtensibleFileImport and IMAExtensibleCallExport*
Export-only File-based IMAExtensibleFileImport and IMAExtensibleFileExport*

* Although the MIIS server requires the listed methods to be implemented, only the starred interfaces are currently used by the MIIS server in this type of connected data source extension. For interfaces that are required but not used by the MIIS Server, you can throw the EntryPointNotImplementedException exception in the methods.

All connected data source extensions must implement the IMAExtensibleFileImport interface and the GenerateImportFile method. In addition to this interface, a connected data source extension must also implement one of the following interfaces, depending upon the export mode of the extension:

Export mode Interface to implement Methods
Call-based IMAExtensibleCallExport BeginExport
EndExport
ExportEntry
File-based IMAExtensibleFileExport DeliverExportFile

[Visual Basic .NET]

The following Visual Basic .NET example shows an entire class declaration for a call-based password extension:

Imports Microsoft.MetadirectoryServices

Public Class Sample_CallBased_Extension
Implements IMAExtensibleFileImport
Implements IMAExtensibleCallExport

Public Sub GenerateImportFile(ByVal fileName As String, _
							ByVal connectTo As String, _
							ByVal user As String, _
							ByVal password As String, _
							ByVal configParameters As Microsoft.MetadirectoryServices.ConfigParameterCollection, _
							ByVal fFullImport As Boolean, _
							ByVal types As Microsoft.MetadirectoryServices.TypeDescriptionCollection, _
							ByRef customData As String) _
  Implements Microsoft.MetadirectoryServices.IMAExtensibleFileImport.GenerateImportFile
  ' TODO: Remove this throw statement if you implement this method.
End Sub

Public Sub BeginExport(ByVal connectTo As String, _
					 ByVal user As String, _
					 ByVal password As String, _
					 ByVal types As Microsoft.MetadirectoryServices.TypeDescriptionCollection) _
  Implements Microsoft.MetadirectoryServices.IMAExtensibleCallExport.BeginExport
  ' TODO: Remove this throw statement if you implement this method.
End Sub

Public Sub EndExport() Implements Microsoft.MetadirectoryServices.IMAExtensibleCallExport.EndExport
  ' TODO: Remove this throw statement if you implement this method.
End Sub

Public Sub ExportEntry(ByVal modificationType As Microsoft.MetadirectoryServices.ModificationType, _
					 ByVal changedAttributes() As String, _
					 ByVal csentry As Microsoft.MetadirectoryServices.CSEntry) _
  Implements Microsoft.MetadirectoryServices.IMAExtensibleCallExport.ExportEntry
  ' TODO: Remove this throw statement if you implement this method.
End Sub

End Class

[C#]

The following C# example shows an entire class declaration for a call-based password extension:

using System;
using Microsoft.MetadirectoryServices;

namespace SampleCDExtension
{
  public class Sample_CallBased_Extension : IMAExtensibleFileImport, IMAExtensibleCallExport
  {
	public Sample_CallBased_Extension()
	{
	//
	// TODO: Add constructor logic here
	//
}
	
	public void GenerateImportFile(
	string fileName,
	string connectTo,
	string user,
	string password,
	ConfigParameterCollection configParameters,
	Boolean fFullImport,
	TypeDescriptionCollection types,
	ref string customData
	)
	{
		// TODO: Remove this throw statement if you implement this method.
} 
	
	public void BeginExport(
		string connectTo,
		string user,
		string password,
		ConfigParameterCollection configParameters,
		TypeDescriptionCollection types
		)
		{
		// TODO: Remove this throw statement if you implement this method.
	}
	
	public void ExportEntry(
		ModificationType modificationType,
		string[] changedAttributes,
		CSEntry csentry
		)
		{
		// TODO: Remove this throw statement if you implement this method.
	}
	
	 public void EndExport()
	 {
	 // TODO: Remove this throw statement if you implement this method.
	 }
  }

}

[Visual Basic .NET]

The following example shows an entire class declaration for a file-based password extension:

Imports Microsoft.MetadirectoryServices

Public Class Sample_CallBased_Extension
Implements IMAExtensibleFileImport
Implements IMAExtensibleFileExport

Public Sub GenerateImportFile(ByVal fileName As String, _
							ByVal connectTo As String, _
							ByVal user As String, _
							ByVal password As String, _
							ByVal configParameters As Microsoft.MetadirectoryServices.ConfigParameterCollection, _
							ByVal fFullImport As Boolean, _
							ByVal types As Microsoft.MetadirectoryServices.TypeDescriptionCollection, _
							ByRef customData As String) _
  Implements Microsoft.MetadirectoryServices.IMAExtensibleFileImport.GenerateImportFile
  ' TODO: Remove this throw statement if you implement this method.
End Sub

Public Sub DeliverExportFile(ByVal fileName As String, _
							 ByVal connectTo As String, _
							 ByVal user As String, _
							 ByVal password As String, _
							 ByVal configParameters As Microsoft.MetadirectoryServices.ConfigParameterCollection, _
							 ByVal types As Microsoft.MetadirectoryServices.TypeDescriptionCollection) _
  Implements Microsoft.MetadirectoryServices.IMAExtensibleFileExport.DeliverExportFile
  ' TODO: Remove this throw statement if you implement this method.
End Sub

End Class

[C#]

The following example shows an entire class declaration for a file-based password extension:

using System;
using Microsoft.MetadirectoryServices;

namespace SampleCDExtension
{
  public class Sample_CallBased_Extension : IMAExtensibleFileImport, IMAExtensibleFileExport
	{
	public Sample_CallBased_Extension()
		{
		 //
		 // TODO: Add constructor logic here
		 //
	}
	public void GenerateImportFile(
		string fileName,
		string connectTo,
		string user,
		string password,
		ConfigParameterCollection configParameters,
		Boolean fFullImport,
		TypeDescriptionCollection types,
		ref String customData
		)
		{
		// TODO: Remove this throw statement if you implement this method.
	} 
	
	public void DeliverExportFile(	
		string fileName,
		string connectTo,
		string user,
		string password,
		ConfigParameterCollection configParameters,
		TypeDescriptionCollection types
		)
		{
		// TODO: Remove this throw statement if you implement this method.
	}
}
}

Exceptions

The Microsoft.MetadirectoryServices namespace defines the following exceptions, which are specific to connected data source extensions in MIIS. For information about when the exception should be thrown or caught, see Exceptions.

See Also

Creating a Connected Data Source Extension in Visual Basic .NET, Creating a Connected Data Source Extension in C#