Interface ElementImporter

All Known Subinterfaces:
ClassExporterImporter
All Known Implementing Classes:
wt.ixb.epm.handlers.forclasses._ExpImpForEPMDocument, wt.associativity.ixb.handlers.forclasses._ExpImpForEquivalenceLink, wt.esi.ixb.handlers.forclasses._ExpImpForERPPartSpecificPlantData, wt.esi.ixb.handlers.forclasses._ExpImpForERPPartSpecificPlantDataLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMCompatibilityLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMDescribeMfgProcessLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMDocumentDescribeLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMDocumentReferenceLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMMfgStandardUsageLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMOperationProcessLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMOperationToConsumableLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMOperationToOperatedPartLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMOperationToPartLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMOperationToWorkCenterLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMOperationUsageLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMPartToPlantAssignmentLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMPartToProcessPlanLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMPlantAssignmentLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMPlantLocalizationLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMPrecedenceConstraintLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMProcessPlanLocalizationLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMSequenceUsageLink, com.ptc.windchill.mpml.ixb.handlers.forclasses._ExpImpForMPMStandardProcedureLink, wt.ixb.handlers.forclasses._ExpImpForWTDocument, wt.ixb.handlers.forclasses._ExpImpForWTDocumentDependencyLink, wt.ixb.handlers.forclasses._ExpImpForWTDocumentUsageLink, ClassExporterImporterTemplate, ClassExporterImporterTemplateGeneral, ExpImpForEPMDocument, ExpImpForEquivalenceLink, ExpImpForERPPartSpecificPlantData, ExpImpForERPPartSpecificPlantDataLink, ExpImpForLinkObject, ExpImpForMPMCompatibilityLink, ExpImpForMPMDescribeMfgProcessLink, ExpImpForMPMDocumentDescribeLink, ExpImpForMPMDocumentReferenceLink, ExpImpForMPMMfgStandardUsageLink, ExpImpForMPMOperationProcessLink, ExpImpForMPMOperationToConsumableLink, ExpImpForMPMOperationToOperatedPartLink, ExpImpForMPMOperationToPartLink, ExpImpForMPMOperationToWorkCenterLink, ExpImpForMPMOperationUsageLink, ExpImpForMPMPartToPlantAssignmentLink, ExpImpForMPMPartToProcessPlanLink, ExpImpForMPMPlantAssignmentLink, ExpImpForMPMPlantLocalizationLink, ExpImpForMPMPrecedenceConstraintLink, ExpImpForMPMProcessPlanLocalizationLink, ExpImpForMPMSequenceUsageLink, ExpImpForMPMStandardProcedureLink, ExpImpForVersionedObject, ExpImpForWTDocument, ExpImpForWTDocumentDependencyLink, ExpImpForWTDocumentUsageLink

public interface ElementImporter
Interface for all class handlers for import.

Supported API: true

Extendable: false
  • Field Details

    • NO_PRIORITY

      static final int NO_PRIORITY
      The default priority / No specific priority. The value returned is zero.

      Supported API: true
      See Also:
  • Method Details

    • prepareForCheckConflicts

      void prepareForCheckConflicts(List<IxbElement> ixbElementLst, Importer importer) throws WTException
      Called in the beginning of conflict check process prior to the real import or preview.

      Supported API: true
      Parameters:
      ixbElementLst - List of IxbElements
      importer - The Importer instance that represents the context of the import operation
      Throws:
      WTException
    • checkConflicts

      void checkConflicts(IxbElement elem, Importer importer) throws WTException
      Checks conflicts that can arise while import process.

      Supported API: true
      Parameters:
      elem - the XML element to be imported.
      importer - The Importer instance that represents the context of the import operation.
      Throws:
      WTException
    • checkConflicts

      void checkConflicts(List<IxbElement> elem, Importer importer) throws WTException
      Checks conflicts that can arise while import process.

      Supported API: true
      Parameters:
      elem - the XML element to be imported.
      importer - The Importer instance that represents the context of the import operation.
      Throws:
      WTException
    • _checkConflicts

      void _checkConflicts(List<IxbElement> elems, Importer importer, String actionName, String tag) throws WTException
      Checks conflicts that can arise while import process.

      Supported API: true
      Parameters:
      elems - the XML element to be imported.
      importer - The Importer instance that represents the context of the import operation.
      actionName -
      tag -
      Throws:
      WTException
    • _checkConflicts

      void _checkConflicts(IxbElement elem, Importer importer) throws WTException
      Checks conflicts that can arise while import process.This method is used to delegate the checkConflict to actor.

      Supported API: true
      Parameters:
      elem - the XML element to be imported.
      importer - The Importer instance that represents the context of the import operation.
      Throws:
      WTException
    • finalizeCheckConflicts

      void finalizeCheckConflicts(Importer importer) throws WTException
      Called in the end of conflict check process.

      Supported API: true
      Parameters:
      importer - The Importer instance that represents the context of the import operation.
      Throws:
      WTException
    • prepareForImport

      void prepareForImport(List<IxbElement> ixbElementLst, Importer importer) throws WTException
      Called in the end of conflict check process and prior to the real import process.

      Supported API: true
      Parameters:
      ixbElementLst - The list of ixb documents which will be imported.
      importer - The Importer instance that represents the context of the import operation.
      Throws:
      WTException
    • getImportPriority

      int getImportPriority() throws WTException
      Return the import priority of the object type represented by this import handler.
      Import priority defines the order in which objects will be imported. This method does not carry parameters in the signature. The return value can not be negative. Those XML files will have a higher import priority for smaller returned values. This is complemented by ClassExporter.getExportPriority() So, any import handler overriding this, must also consider overriding getExportPriority() in the corresponding export handler.

      Supported API: true
      Returns:
      int
      Throws:
      WTException
    • getAdditionalImportPriority

      int getAdditionalImportPriority(IxbElement fileXML) throws WTException
      Return the additional import priority based on the XML file, supplemented to getImportPriority().
      The returned number defines the order in which XML file will be imported if getImportPriority() returns the same value. In general, if getImportPriority() returns a smaller value, it will have a higher import priority; for the XML files with the same value of getImportPriority(), the one with a smaller value from this method will have a higher import priority.The returned value must be at least 0. This is complemented by ClassExporter.getAdditionalExportPriority(Object) So, any import handler overriding this, must also consider overriding getAdditionalExportPriority() in the corresponding export handler.

      Supported API: true
      Parameters:
      fileXML -
      Returns:
      int
      Throws:
      WTException
    • importElement

      Object importElement(IxbElement elem, Importer importer) throws WTException
      Imports XML element in context given by importer parameter. Returns the imported object.

      Supported API: true
      Parameters:
      elem - the XML element to be imported.
      importer - The Importer instance that represents the context of the import operation.
      Returns:
      Object
      Throws:
      WTException
    • importElements

      List<IxbHndHelper.ElementObjectPair> importElements(List<IxbElement> elements, Importer importer, String actionName, String tag) throws WTException
      Imports XML elements in context given by importer parameter. Returns the imported objects.

      Supported API: true
      Parameters:
      elements - the XML elements to be imported.
      importer - The Importer instance that represents the context of the import operation.
      actionName - The action associated with this list of elements.
      tag - The tag associated with this list of elements.
      Returns:
      List of imported objects
      Throws:
      WTException
    • finalizeImport

      void finalizeImport(Importer importer) throws WTException
      Called in the end of the whole import process to execute any import process finalization.

      Supported API: true
      Parameters:
      importer - The Importer instance that represents the context of the import operation.
      Throws:
      WTException
    • previewElement

      void previewElement(IxbElement elem, Importer importer) throws WTException
      Preview XML element in context given by importer parameter. Usually it will check conflicts without performing real import.

      Supported API: true
      Parameters:
      elem - the XML element to be imported.
      importer - The Importer instance that represents the context of the import operation.
      Throws:
      WTException
    • getObjectDisplayID

      String getObjectDisplayID(IxbElement elem, Importer importer) throws WTException
      Return the localized identity of the element that will be used in import operation. Expected to be used for logging purpose only.

      Supported API: true
      Parameters:
      elem - the XML element to be imported.
      importer - The Importer instance that represents the context of the import operation.
      Returns:
      String
      Throws:
      WTException
    • getObjectDisplayIDs

      default List<String> getObjectDisplayIDs(Collection<? extends IxbElement> elements, Importer importer) throws WTException
      Implementation of getObjectDisplayID(IxbElement, Importer) for a batch. Expected to be used for logging purpose only

      Supported API: true
      Parameters:
      elements -
      importer -
      Returns:
      Throws:
      WTException
    • outputLog

      void outputLog(Object ob, Importer importer) throws WTException
      Output log for imported object.

      Supported API: true
      Parameters:
      ob - he object for the log. It can be a new imported object or an existing one in the datastore.
      importer - The Importer instance that represents the context of the import operation.
      Throws:
      WTException