Advanced Customization > Services and Infrastructure Customization > Import Export Framework > Navigating Through an Object’s Structure with ObjectSet Application > Examples > Examples about Exp/Imp Application: > Import Application
  
Import Application
The current Windchill Import GUI and StandardIXBService are the Import Application. The current Windchill Import OOTB GUI is Import Application client that calls import process in StandardIXBService (Import Application server) via IXBHelper.
ObjectImportParameters importParam = new ObjectImportParameters ();

importParam.setActionName(actorName);
importParam.setContainer(container);
importParam.setDataFile(dataF);
importParam.setDetailedLog(detailedLog);
importParam.setGuiId(reqGUIid);
importParam.setPolicyFile(policyFile);
importParam.setPreviewOnly(isPreview);
importParam.setRuleFile(ruleF);
importParam.setValidation(true);
importParam.setLocale(RB.getLocale());
importParam.setOverrideConflicts(overrideC);
importParam.setContainerMappingFile(containerMappingFile);
importParam.getContextData().setIXApplicationContext(appContext);

IXBExpImpStatus status = IXBHelper.service.doImport (importParam );
It calls methods doImport(…) of the class StandardIXBService to do the import process.
IXBExpImpStatus is a class in wt.ixb.clientsAccess containing information about Exp/Imp process and used to pass Exp/Imp status between server and client.
ruleFile is the rule file for export process. This file is provided to Importer to create a tuner for import process.
dataFile is the jar file that contains XML files of objects that will be imported.
overrideConflicts specifies whether overridable conflicts must be overridden or not.
isPreview specifies whether the process should do real import, or check conflicts and display what objects will be imported.
guiId is the id of the GUI from which the export process is called. See the method recordGuiIdInContext() of the class wt.clients.ixb.util.ExpImpServerRequest for an example how to create the GUIid.
detailLog indicates whether the status message should be in details or not.
creatorName specifies how top-level imported objects (for example EPMDocument, WTDocument, WTPart) are created.
stDtd specifies which version of Exp/Imp handlers will be used. This is used to support backward compatible. If stDtd is null or empty (“”), the STRING_DTD will be calculated based on version of current Windchill system.
When the method IXBHelper.service.doImport(…) is called, it will call to the method doImportImpl(…) in StandardIXBService.
This method:
Puts creator name in WTContext to be used by import handler.
Creates a general import handler ImportHandler handler.
Gets a list of XML files from the Jar file to be imported by calling jar.getFileNamesByExtension ("xml");
Creates an instance of Importer, the class that does the import job.
Depending on isPreview (true/false), the method doImportImpl(…) calls the appropriate methods of Importer to do a preview or the real import:
importer.doImport(stream);
importer.doPreview(stream);
The others (importer.doImport(fn, tag) and importer.doPreview(fn,tag)) are for optimization, and they depend on how XML files are named. This feature is just for a particular Exp/Imp Application (wt.clients.ixb and StandardIXBService).
Sends log messages back to client.