MigrationMainObj Object
Use the MigrationMainObj object to coordinate the migration from the Site Server 3.0 Membership Directory to the Commerce Server Profile data store. The MigrationMainObj object uses the following four COM objects to implement this task:
Interface
The MigrationMainObj object supports the following interface:
interface IMigrationProfile::IDispatch
{
HRESULT Initialize(BSTR sProfileDirectory);
HRESULT MigrateObject(BSTR bstrKeyName, long lProfile_id);
HRESULT ShutDown();
};
Methods
The following table shows the methods of the MigrationMainObj object, and provides a descripton of each.
Method | Description |
Initialize | Sets up all the components for the migration process. The sProfileDirectory parameter, indicating where all profile files reside, is parsed each for the following values:
|
MigrateObject | Called from the Active Server Pages (ASP) page or from Microsoft Visual Basic Scripting Edition (VBscript) to migrate an ADSPath key to the Commerce stores. The profile ID to be used for this ADSPath key is passed to the object. The MigrationProfile object then finds the appropriate attribute array for this profile to be filled in by the MigrationReadObj object. This array, along with the key (ADSPath) and profile ID is then passed to the MigrationReadObj/MigrationModifyObj/MigrationWriteObj objects to be processed. |
ShutDown | Called from MigrationReadObj/MigrationWriteObj objects and also deallocates the data structures that were created upon initialization. |
Remarks
The following structure should be added to the .IDL file to facilitate passing the profile information to each object.
typedef struct _PROFILE
long lprofile_id;
BSTR bstrConnection; //bstrConfigStore in CS
BSTR bstrCatalog; // used in profile service initialization
BSTR bstrMemberOf; // migrate user's membership?
SAFEARRAY(BSTR) Attributes;
SAFEARRAY(USHORT) nAttributeTypes; // number of attributes types?
SAFEARRAY(BSTR) ProfileTypes; // only for write use
BSTR bstrMOUserName; // Membership User Name
BSTR bstrMDPassword;
BSTR bstrCSUserName
BSTR bstrCSPassword;
BSTR bstrADSite; // True for ADSite, otherwise False
BSTR bstrGroupOU; // OU that holds all groups
// modify info
long lNumModifies; // total number of modifiers in this profile
SAFEARRAY(USHORT) rgModIndex;
} PROFILE;