wt.ixb.handlers.forclasses
Class ExpImpForWTPartDescribeLink

java.lang.Object
  extended bywt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
      extended bywt.ixb.publicforhandlers.ClassExporterImporterTemplate
          extended bywt.ixb.handlers.forclasses.ExpImpForWTPartDescribeLink
All Implemented Interfaces:
ClassExporter, ClassExporterImporter, ElementImporter
Direct Known Subclasses:
NmWTPartDescribeLinkHandler

public class ExpImpForWTPartDescribeLink
extends ClassExporterImporterTemplate


Nested Class Summary
 
Nested classes inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
ClassExporterImporterTemplate.ContentHolderCommitListener
 
Field Summary
private  WTDocument describedBy
           
private  WTPart describes
           
private  Persistable end_1
           
private  Persistable end_2
           
private  boolean ignored
           
 
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
 
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
CONFLICT_RESOURCE
 
Constructor Summary
ExpImpForWTPartDescribeLink()
           
 
Method Summary
 void checkConflicts(IxbElement fileXML, Importer importer)
          Checks conflicts that can arise while import process.
protected  IxbDocument createFileXMLOnExport(Exporter exporter)
          Creates an IxbDocument with the root tag.
 Object createObject(IxbElement fileXML, Importer importer)
          Creates new instance of Windchill object.
protected  void exportAttributes(Object object, IxbDocument fileXML, Exporter exporter)
          Export the attributes according to the DTD.
 Object findAmongExistingObjects(IxbElement fileXML, Importer importer)
          Implements typical way of finding whether object from given XML file exists already in Windchill database.
private  Object findAmongExistingObjectsForImport(IxbElement fileXML, Importer importer)
          Implements typical way of finding whether object from given XML file exists already in Windchill database for import application.
 int getImportPriority()
          Return the import priority of the object type represented by this import handler.
protected  String getRootTag()
          Returns the desired root tag for the object type to be exported, e.g.
private static void PP(String s)
           
 Object storeObject(Object object, IxbElement fileXML, Importer importer)
          That is the general template how to store object.
 
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
exportObject, finalizeImportObject, importElement, importObjectAttributes, importObjectAttributesAfterStore, isObjectIgnored, isObjectNew, outputLog, rememberNewObInfo, setObjectIgnored, setObjectIsNew, storeAdditionalInfo, storeElement
 
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
finalizeCheckConflicts, finalizeExport, finalizeImport, getAdditionalImportPriority, getObjectDisplayID, prepareForCheckConflicts, prepareForImport, previewElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

describedBy

private WTDocument describedBy

describes

private WTPart describes

end_1

private Persistable end_1

end_2

private Persistable end_2

ignored

private boolean ignored
Constructor Detail

ExpImpForWTPartDescribeLink

public ExpImpForWTPartDescribeLink()
Method Detail

getRootTag

protected String getRootTag()
Description copied from class: ClassExporterImporterTemplate
Returns the desired root tag for the object type to be exported, e.g. "WTDocument". Individual class handlers are expected to implement this method, otherwise the importer might be confused to choosed the exact class handler during import.

Supported API: true

Overrides:
getRootTag in class ClassExporterImporterTemplate
Returns:
String

exportAttributes

protected void exportAttributes(Object object,
                                IxbDocument fileXML,
                                Exporter exporter)
                         throws WTException
Description copied from class: ClassExporterImporterTemplate
Export the attributes according to the DTD. The parameter fileXML is the returned vlue from the method createFileXMLOnExport(Exporter exporter).

Supported API: true

Overrides:
exportAttributes in class ClassExporterImporterTemplate
Parameters:
object -
fileXML -
exporter -
Throws:
WTException

createFileXMLOnExport

protected IxbDocument createFileXMLOnExport(Exporter exporter)
                                     throws WTException
Description copied from class: ClassExporterImporterTemplate
Creates an IxbDocument with the root tag. See getRootTag()

Supported API: true

Overrides:
createFileXMLOnExport in class ClassExporterImporterTemplate
Parameters:
exporter -
Returns:
IxbDocument
Throws:
WTException

checkConflicts

public void checkConflicts(IxbElement fileXML,
                           Importer importer)
                    throws WTException
Description copied from class: ClassExporterImporterTemplateGeneral
Checks conflicts that can arise while import process.

Supported API: true

Specified by:
checkConflicts in interface ElementImporter
Overrides:
checkConflicts in class ClassExporterImporterTemplateGeneral
Parameters:
fileXML - the XML element to be imported.
importer - The Importer instance that represents the context of the import operation.
Throws:
WTException

findAmongExistingObjects

public Object findAmongExistingObjects(IxbElement fileXML,
                                       Importer importer)
                                throws WTException
Description copied from class: ClassExporterImporterTemplate
Implements typical way of finding whether object from given XML file exists already in Windchill database.

Supported API: true

Overrides:
findAmongExistingObjects in class ClassExporterImporterTemplate
Parameters:
fileXML -
importer -
Returns:
Object
Throws:
WTException

findAmongExistingObjectsForImport

private Object findAmongExistingObjectsForImport(IxbElement fileXML,
                                                 Importer importer)
                                          throws WTException
Description copied from class: ClassExporterImporterTemplate
Implements typical way of finding whether object from given XML file exists already in Windchill database for import application.

Throws:
WTException

createObject

public Object createObject(IxbElement fileXML,
                           Importer importer)
                    throws WTException
Description copied from class: ClassExporterImporterTemplate
Creates new instance of Windchill object. Every class requires its own method to create object of this class. So, this method must be overriden by any class specific import handler

Supported API: true

Specified by:
createObject in class ClassExporterImporterTemplate
Parameters:
fileXML -
importer -
Returns:
Object
Throws:
WTException

storeObject

public Object storeObject(Object object,
                          IxbElement fileXML,
                          Importer importer)
                   throws WTException
Description copied from class: ClassExporterImporterTemplate
That is the general template how to store object. It looks like it will be good for many classes. If for some class it is not good then it can be override this method

Supported API: true

Overrides:
storeObject in class ClassExporterImporterTemplate
Parameters:
object -
fileXML -
importer -
Returns:
Object
Throws:
WTException

getImportPriority

public int getImportPriority()
                      throws WTException
Description copied from class: ClassExporterImporterTemplateGeneral
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.

Supported API: true

Specified by:
getImportPriority in interface ElementImporter
Specified by:
getImportPriority in class ClassExporterImporterTemplateGeneral
Returns:
int
Throws:
WTException

PP

private static void PP(String s)