Content Manager 25.1 DataPort Help

# Import Processing

The following methods on the interface are called when importing. They are described here in the order in which they are called.

- OriginType is called and you return a value from the TRIM.SDK.OriginType enum to indicate what type of origin is being used. Origin types can be used to help find origins in Content Manager.
- GetFormatterInfo is called and the value returned is displayed on the UI. This information is not stored by Content Manager DataPort and a subsequent call to GetFormatterInfo is done at a later time to get this information and output it to the log file.
- GetFieldNames is called (see GetFieldNames for details).
- Initialize is then called and here you would do anything you required to ensure you are ready for the doing the import. This might consist of opening a file or connecting to a database.
  Now the import can start.
- GetNextItem is at the heart of the import process and is called in a loop until GetNextItem returns null. This is where you give Content Manager DataPort the data to create an import item in Content Manager.
- ItemProcessed can be called at several points during execution but suffice to say that it will be called for each import item passed in from GetNextItem when the processing of that item is complete. As there is the possibility of multiple passes of the data ItemProcessed may not be called in the same order for the items as they came in via GetNextItem.
  This method gives you the ability to value add to the import. If the import of the item has been successful you will be able to locate that item in Content Manager by its URI and then do any other processing you require directly on the Content Manager object via the Content Manager Software Development Kit (SDK). If performance is paramount then we strongly suggest doing any secondary processing on a separate execution thread.

- CloseConnection is called after the GetNextItem loop completes (GetNextItem has returned null indicating there are no more items to import). There may be a lot of processing Content Manager DataPort has to do on the items but it now has all the data from the import source so the import source can be closed.

  NOTE: Do NOT allow CloseConnection to throw an error as this may stop the import at an unexpected place in the data.

- ImportCompleted is called when Content Manager DataPort has finalized any processing of import data. This will pass out some statistical data as to what happened during the import.
- Dispose is called on the formatter when Content Manager DataPort is no longer going to use it.

Related information

Copyright 2008-2025 Open Text
Version 25.1 | Last updated July 2023
Contact

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to hprmdocumentation@microfocus.com.

We appreciate your feedback!

Product: Content Manager 25.1

Topic Title: Import Processing