Package wt.ixb.publicforhandlers
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
Supported API: true
Extendable: false
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default priority / No specific priority. -
Method Summary
Modifier and TypeMethodDescriptionvoid_checkConflicts(List<IxbElement> elems, Importer importer, String actionName, String tag) Checks conflicts that can arise while import process.void_checkConflicts(IxbElement elem, Importer importer) Checks conflicts that can arise while import process.This method is used to delegate the checkConflict to actor.voidcheckConflicts(List<IxbElement> elem, Importer importer) Checks conflicts that can arise while import process.voidcheckConflicts(IxbElement elem, Importer importer) Checks conflicts that can arise while import process.voidfinalizeCheckConflicts(Importer importer) Called in the end of conflict check process.voidfinalizeImport(Importer importer) Called in the end of the whole import process to execute any import process finalization.intgetAdditionalImportPriority(IxbElement fileXML) Return the additional import priority based on the XML file, supplemented togetImportPriority().intReturn the import priority of the object type represented by this import handler.getObjectDisplayID(IxbElement elem, Importer importer) Return the localized identity of the element that will be used in import operation.getObjectDisplayIDs(Collection<? extends IxbElement> elements, Importer importer) Implementation ofgetObjectDisplayID(IxbElement, Importer)for a batch.importElement(IxbElement elem, Importer importer) Imports XML element in context given by importer parameter.importElements(List<IxbElement> elements, Importer importer, String actionName, String tag) Imports XML elements in context given by importer parameter.voidOutput log for imported object.voidprepareForCheckConflicts(List<IxbElement> ixbElementLst, Importer importer) Called in the beginning of conflict check process prior to the real import or preview.voidprepareForImport(List<IxbElement> ixbElementLst, Importer importer) Called in the end of conflict check process and prior to the real import process.voidpreviewElement(IxbElement elem, Importer importer) Preview XML element in context given by importer parameter.
-
Field Details
-
NO_PRIORITY
static final int NO_PRIORITYThe default priority / No specific priority. The value returned is zero.
Supported API: true- See Also:
-
-
Method Details
-
prepareForCheckConflicts
Called in the beginning of conflict check process prior to the real import or preview.
Supported API: true- Parameters:
ixbElementLst- List of IxbElementsimporter- TheImporterinstance that represents the context of the import operation- Throws:
WTException
-
checkConflicts
Checks conflicts that can arise while import process.
Supported API: true- Parameters:
elem- the XML element to be imported.importer- TheImporterinstance that represents the context of the import operation.- Throws:
WTException
-
checkConflicts
Checks conflicts that can arise while import process.
Supported API: true- Parameters:
elem- the XML element to be imported.importer- TheImporterinstance 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- TheImporterinstance that represents the context of the import operation.actionName-tag-- Throws:
WTException
-
_checkConflicts
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- TheImporterinstance that represents the context of the import operation.- Throws:
WTException
-
finalizeCheckConflicts
Called in the end of conflict check process.
Supported API: true- Parameters:
importer- TheImporterinstance that represents the context of the import operation.- Throws:
WTException
-
prepareForImport
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- TheImporterinstance that represents the context of the import operation.- Throws:
WTException
-
getImportPriority
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 byClassExporter.getExportPriority()So, any import handler overriding this, must also consider overridinggetExportPriority()in the corresponding export handler.
Supported API: true- Returns:
- int
- Throws:
WTException
-
getAdditionalImportPriority
Return the additional import priority based on the XML file, supplemented togetImportPriority().
The returned number defines the order in which XML file will be imported ifgetImportPriority()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 ofgetImportPriority(), 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 byClassExporter.getAdditionalExportPriority(Object)So, any import handler overriding this, must also consider overridinggetAdditionalExportPriority()in the corresponding export handler.
Supported API: true- Parameters:
fileXML-- Returns:
- int
- Throws:
WTException
-
importElement
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- TheImporterinstance 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- TheImporterinstance 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
Called in the end of the whole import process to execute any import process finalization.
Supported API: true- Parameters:
importer- TheImporterinstance that represents the context of the import operation.- Throws:
WTException
-
previewElement
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- TheImporterinstance that represents the context of the import operation.- Throws:
WTException
-
getObjectDisplayID
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- TheImporterinstance 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 ofgetObjectDisplayID(IxbElement, Importer)for a batch. Expected to be used for logging purpose only
Supported API: true- Parameters:
elements-importer-- Returns:
- Throws:
WTException
-
outputLog
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- TheImporterinstance that represents the context of the import operation.- Throws:
WTException
-