wt.part.ixbhandlers
Class ExpImpForWTProduct

java.lang.Object
  extended bywt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
      extended bywt.ixb.publicforhandlers.ClassExporterImporterTemplate
          extended bywt.ixb.publicforhandlers.ExpImpForVersionedObject
              extended bywt.ixb.handlers.forclasses.ExpImpForWTPart
                  extended bywt.part.ixbhandlers.ExpImpForWTProduct
All Implemented Interfaces:
ClassExporter, ClassExporterImporter, ElementImporter, ExpImpOfObjectRefIfc, ExpOfObjectRefIfc, ImpOfObjectRefIfc

public class ExpImpForWTProduct
extends ExpImpForWTPart

This a trivial example of building handler for a subclass. This handler does not process any additional attributes. Normally, you will also need to override exportAttributes(), importObjectAttributes() and/or importObjectAttributesAfterStore().


Nested Class Summary
 
Nested classes inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
ClassExporterImporterTemplate.ContentHolderCommitListener
 
Field Summary
 
Fields inherited from class wt.ixb.publicforhandlers.ExpImpForVersionedObject
actionName, DEBUG, masterIsNew, NUMBER, targetObjs
 
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
 
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
CONFLICT_RESOURCE
 
Constructor Summary
ExpImpForWTProduct()
           
 
Method Summary
 Versioned createEmptyObject(IxbElement fileXML, Importer importer, Mastered master)
          Creates an empty object with the specified master and sets related attributes based upon values in the xml archive.
 Versioned createNewObject(IxbElement fileXML, Importer importer)
          Overridden to create object of correct class.
 void exportObjectRef(Object object, IxbElement element, Exporter exporter)
           
 Object findObjectFromXML(IxbElement element, Importer importer)
           
 String getObjectClassName()
           
 String getObjectMasterClassName()
           
protected  String getRootTag()
          Overriden to create correct root tag in XML.
 boolean objectExistPriorImport(IxbElement element, Importer importer)
           
private static void printout(String s)
           
 
Methods inherited from class wt.ixb.handlers.forclasses.ExpImpForWTPart
checkConflicts, exportAttributes, exportCommonAttributes, getImportPriority, getObjectDisplayID, importObjectAttributes, importObjectAttributesAfterStore, removeAllLinks
 
Methods inherited from class wt.ixb.publicforhandlers.ExpImpForVersionedObject
createObject, finalizeImport, findAmongExistingObjects, getActionName, getCheckoutFolder, getMaster, getMaster, importElement, outputLog, previewElement, storeObject, storeObjectsBirthUfid, storeVersionedObject
 
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
createFileXMLOnExport, exportObject, finalizeImportObject, isObjectIgnored, isObjectNew, rememberNewObInfo, setObjectIgnored, setObjectIsNew, storeAdditionalInfo, storeElement
 
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
finalizeCheckConflicts, finalizeExport, getAdditionalImportPriority, prepareForCheckConflicts, prepareForImport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpImpForWTProduct

public ExpImpForWTProduct()
Method Detail

getRootTag

protected String getRootTag()
Overriden to create correct root tag in XML.

Overrides:
getRootTag in class ExpImpForWTPart
Returns:

getObjectClassName

public String getObjectClassName()
Overrides:
getObjectClassName in class ExpImpForWTPart

getObjectMasterClassName

public String getObjectMasterClassName()
Overrides:
getObjectMasterClassName in class ExpImpForWTPart

createNewObject

public Versioned createNewObject(IxbElement fileXML,
                                 Importer importer)
                          throws WTException
Overridden to create object of correct class.

Overrides:
createNewObject in class ExpImpForWTPart
Parameters:
fileXML -
importer -
Returns:
Throws:
WTException

createEmptyObject

public Versioned createEmptyObject(IxbElement fileXML,
                                   Importer importer,
                                   Mastered master)
                            throws WTException
Creates an empty object with the specified master and sets related attributes based upon values in the xml archive. This is used for restore operation where the master typically exists.

Overrides:
createEmptyObject in class ExpImpForWTPart
Parameters:
fileXML - the xml
importer - the importer
master - the existing master
Returns:
the newly created object
Throws:
WTException - when the operation fails

findObjectFromXML

public Object findObjectFromXML(IxbElement element,
                                Importer importer)
                         throws WTException
Specified by:
findObjectFromXML in interface ImpOfObjectRefIfc
Overrides:
findObjectFromXML in class ExpImpForWTPart
Throws:
WTException

objectExistPriorImport

public boolean objectExistPriorImport(IxbElement element,
                                      Importer importer)
                               throws WTException
Specified by:
objectExistPriorImport in interface ImpOfObjectRefIfc
Overrides:
objectExistPriorImport in class ExpImpForWTPart
Throws:
WTException

exportObjectRef

public void exportObjectRef(Object object,
                            IxbElement element,
                            Exporter exporter)
                     throws WTException
Specified by:
exportObjectRef in interface ExpOfObjectRefIfc
Overrides:
exportObjectRef in class ExpImpForWTPart
Throws:
WTException

printout

private static void printout(String s)