Share via


IMAExtensibleFileImport.GenerateImportFile Method

Called during an import run to connect to the data source and generate a file that contains the data to be imported from a connected directory to the connector space.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)

Usage

'Usage
Dim instance As IMAExtensibleFileImport
Dim fileName As String
Dim connectTo As String
Dim user As String
Dim password As String
Dim configParameters As ConfigParameterCollection
Dim fFullImport As Boolean
Dim types As TypeDescriptionCollection
Dim customData As String

instance.GenerateImportFile(fileName, connectTo, user, password, configParameters, fFullImport, types, customData)

Syntax

'Declaration
Sub GenerateImportFile ( _
    fileName As String, _
    connectTo As String, _
    user As String, _
    password As String, _
    configParameters As ConfigParameterCollection, _
    fFullImport As Boolean, _
    types As TypeDescriptionCollection, _
    ByRef customData As String _
)
void GenerateImportFile (
    string fileName,
    string connectTo,
    string user,
    string password,
    ConfigParameterCollection configParameters,
    bool fFullImport,
    TypeDescriptionCollection types,
    ref string customData
)
void GenerateImportFile (
    String^ fileName, 
    String^ connectTo, 
    String^ user, 
    String^ password, 
    ConfigParameterCollection^ configParameters, 
    bool fFullImport, 
    TypeDescriptionCollection^ types, 
    String^% customData
)
void GenerateImportFile (
    String fileName, 
    String connectTo, 
    String user, 
    String password, 
    ConfigParameterCollection configParameters, 
    boolean fFullImport, 
    TypeDescriptionCollection types, 
    /** @ref */ String customData
)

Parameters

  • fileName
    The name of the intermediate file that contains the data from a connected directory to be imported to the connector space. This value comes from the Input file name box in Management Agent Configuration of the Configure Run Profile dialog box when you create a run profile with a Delta Import or a Full Import type step for an extensible connectivity management agent.
  • connectTo
    The name of the connected directory. This value comes from the Connect To box in Connect To in the Configure Connection Information dialog box in the extensible connectivity management agent properties.
  • user
    The user name of the account that has the appropriate privileges on the connected directory. This value comes from the User box in Connect To in the Configure Connection Information dialog box in the extensible connectivity management agent properties.
  • password
    The password of the account that has the appropriate privileges on the connected directory. This value comes from the Password box in Connect To in the Configure Connection Information dialog box in the extensible connectivity management agent properties.
  • configParameters
    The parameters and values that are configured in Configure Additional Parameters of the extensible connectivity management agent properties.
  • fFullImport
    The value for a full or delta import. Set to true for a full import or false for a delta import.
  • types
    The collection of TypeDescription objects. Each TypeDescription object represents a description of a Type class that contains a collection of attribute descriptions.
  • customData
    Arbitrary string information that can be retrieved in a subsequent import run. Use this parameter to store a watermark to enable delta import runs. Embedded nulls are not supported. To use binary information in this parameter, encode the information to Base 64, and then decode the data.

Exceptions

Exception type Condition
BadServerCredentialsException

The credentials that are used to connect to the connected directory are not valid. When this method throws this exception, the run stops and the Windows Management Instrumentation (WMI) Provider returns the string stopped-bad-server-credentials.

This exception does not generate an event log entry.

EntryPointNotImplementedException

The rules extension does not implement this method. When this method throws this exception, the run stops and the WMI Provider returns the string stopped-entry-point-not-implemented.

This exception does not generate an event log entry.

ExtensibleExtensionException

An unexpected error occurred in the extension. When this method throws this exception, the run stops and the WMI Provider returns the string stopped-extensible-extension-error.

This exception generates an event log entry.

ServerDownException

The connected directory extension cannot establish a connection to the connected directory. When this method throws this exception, the run stops and the WMI Provider returns the string stopped-server-down.

This exception does not generate an event log entry.

UnexpectedDataException

The method received unexpected data. When this method throws this exception, the run stops and the WMI Provider returns the string stopped-unexpected-data.

This exception generates an event log entry.

Remarks

All the exceptions that are described in this topic stop a run. If the method throws an exception that is not described in this topic, the run continues. If the run stops, the WMI Provider returns the string stopped-extension-dll-exception and generates an event log entry.

All data in Forefront Identity Manager Synchronization Service (FIM Synchronization Service) uses the Unicode character set. If the connected data source that imports the data into the metaverse uses a different character set, use this method to convert the imported data to the Unicode character set.

The Extensible Management Agent is configured to use the file that is created by IMAExtensibleFileImport.GenerateImportFile as a Unicode file. The IMAExtensibleFileImport.GenerateImportFile function should therefore create a Unicode file, even when the connected source is not Unicode-encoded.

You can pass watermark data to the customData parameter. Do not rely on watermark data to be accurate in the customData parameter. The watermark data can remain even after the connector space has been deleted. Instead of relying upon the watermark data in this parameter, create the watermark in this method.

For a code example that implements this interface, see Example: Connected Data Source Extension for File-Based Data Sources.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

IMAExtensibleFileImport Interface
IMAExtensibleFileImport Members
Microsoft.MetadirectoryServices Namespace
ConfigParameterCollection Class
TypeDescriptionCollection
IMAExtensibleFileImport Interface