wt.part.ixbhandlers
Class ExpImpForWTProduct
java.lang.Object
wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
wt.ixb.publicforhandlers.ClassExporterImporterTemplate
wt.ixb.publicforhandlers.ExpImpForVersionedObject
wt.ixb.handlers.forclasses.ExpImpForWTPart
wt.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().
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpImpForWTProduct
public ExpImpForWTProduct()
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 xmlimporter
- the importermaster
- 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)