Advanced Customization > Services and Infrastructure Customization > Import Export Framework > How to Write Exp/Imp Handlers > How to Write a Class (Element) Import Handler > Handler for Link Object
  
Handler for Link Object
1. Create a Java class that extends ExpImpForLinkObject.
2. Implement method: public Object createObject (IxbElement fileXML, Importer importer)
3. Override the following methods:
protected abstract Class getLinkClass();
protected abstract String getLinkRoleATag();
protected abstract String getLinkRoleBTag();
protected abstract LinkStoreOwnershipType getLinkStoreOwnershipType();
protected abstract Persistable getRoleAObject(IxbElement, Importer);
protected abstract Persistable getRoleAObject(IxbElement, Importer);
protected abstract Object createLinkObject(IxbElement, Importer,
Persistable roleAObj, Persistable roleBObj);
4. Override following methods if necessary.
public Object importObjectAttributes ( Object ob,
IxbElement fileXML,
Importer importer);
public Object storeObjects (List<ElementObjectPair> elements,
Importer importer);
public Object importObjectAttributesAfterStore(IxbElement fileXML,
Importer importer);
public Object findAmongExistingObjectsInternal (IxbElement fileXML,
Importer importer);
Import handlers for non-versioned objects (Link objects) are quite straightforward, and any of the following classes can be referred as example:
ExpImpForWTPartDescribeLink
ExpImpForWTPartReferenceLink