wt.inf.sharing
Class ShareMapIxHandler
java.lang.Object
wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
wt.ixb.publicforhandlers.ClassExporterImporterTemplate
wt.inf.sharing.ShareMapIxHandler
- All Implemented Interfaces:
- ClassExporter, ClassExporterImporter, ElementImporter
- public class ShareMapIxHandler
- extends ClassExporterImporterTemplate
Handler class for the element.
Method Summary |
Object |
createObject(IxbElement elem,
Importer imp)
Imports all share maps in a container. |
SharedContainerMap |
createShareMap(IxbElement elem,
Importer imp,
long orig_id)
Imports wt.inf,sharing.SharedContainerMap objects from xml element. |
void |
exportObject(Object obj,
Exporter exporter)
Exports the specified object in context given by parameter exporter. |
void |
exportShareMap(SharedContainerMap map,
IxbElement elem,
Exporter exporter)
Exports wt.inf,sharing.SharedContainerMap objects. |
void |
exportShareMapSet(IxbElement elem,
Exporter exporter)
Exports all share maps in a container. |
Object |
findAmongExistingObjects(IxbElement elem,
Importer imp)
Implements typical way of finding whether object from given XML file
exists already in Windchill database. |
private AdminDomainRef |
getDomainRef(String domain_path,
WTContainerRef cont_ref)
|
private Long |
getId(Object obj)
|
int |
getImportPriority()
Return the import priority of the object type represented by this
import handler. |
private ObjectIdentifier |
getOid(Object obj)
|
private Long |
getOriginalMapId(IxbElement map_elem)
|
Object |
storeObject(Object obj,
IxbElement elem,
Importer imp)
That is the general template how to store object. |
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate |
createFileXMLOnExport, exportAttributes, finalizeImportObject, getRootTag, importElement, importObjectAttributes, importObjectAttributesAfterStore, isObjectIgnored, isObjectNew, outputLog, rememberNewObInfo, setObjectIgnored, setObjectIsNew, storeAdditionalInfo, storeElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERBOSE
private static final boolean VERBOSE
- See Also:
- Constant Field Values
TRUE_STR
private static final String TRUE_STR
- See Also:
- Constant Field Values
rf
private ReferenceFactory rf
ShareMapIxHandler
public ShareMapIxHandler()
exportObject
public void exportObject(Object obj,
Exporter exporter)
throws WTException
- Description copied from class:
ClassExporterImporterTemplate
- Exports the specified object in context given by parameter exporter.
The implementation of this method is partitioned into several protected
methods. Individual class handlers can override the following protected
methods:
createFileXMLOnExport(Exporter exporter)
, which
create an IxbDocument
with the root tag. See getRootTag()
;
-
exportAttributes (Object object, IxbElement fileXML,
Exporter exporter)
which will export the attributes according
to the DTD. The parameter fileXML is the returned vlue from createFileXMLOnExport(Exporter
exporter)
.
-
storeElement(Object object, IxbElement fileXML, Exporter
exporter)
which will store the fileXML into an xml-file.
Also, export actions from either client or system registry will be
performed. Specifically, the two methods
wt.ixb.tuner.ExportActionHelper.performPreExportAction ()
and
wt.ixb.tuner.ExportActionHelper.performPostExportAction ()
will be called before and after th above three protected methods,
respectively.
Supported API: true
- Specified by:
exportObject
in interface ClassExporter
- Overrides:
exportObject
in class ClassExporterImporterTemplate
- Parameters:
obj
- exporter
- The Exporter
instance that represents the context of the export operation.
- Throws:
WTException
exportShareMapSet
public void exportShareMapSet(IxbElement elem,
Exporter exporter)
throws WTException
- Exports all share maps in a container. The tag is and the export
is done according to the following DTD.
- Throws:
WTException
exportShareMap
public void exportShareMap(SharedContainerMap map,
IxbElement elem,
Exporter exporter)
throws WTException
- Exports
wt.inf,sharing.SharedContainerMap
objects. The tag is and the export
is done according to the following DTD.
- Throws:
WTException
createObject
public Object createObject(IxbElement elem,
Importer imp)
throws WTException
- Imports all share maps in a container. The tag is and the export
is done according to the following DTD.
- Specified by:
createObject
in class ClassExporterImporterTemplate
- Parameters:
elem
- imp
-
- Returns:
- Object
- Throws:
WTException
createShareMap
public SharedContainerMap createShareMap(IxbElement elem,
Importer imp,
long orig_id)
throws WTException
- Imports
wt.inf,sharing.SharedContainerMap
objects from xml element.
The DTD is as follows.
- Throws:
WTException
getOriginalMapId
private Long getOriginalMapId(IxbElement map_elem)
throws WTException
- Throws:
WTException
getDomainRef
private AdminDomainRef getDomainRef(String domain_path,
WTContainerRef cont_ref)
throws WTException
- 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
findAmongExistingObjects
public Object findAmongExistingObjects(IxbElement elem,
Importer imp)
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:
elem
- imp
-
- Returns:
- Object
- Throws:
WTException
storeObject
public Object storeObject(Object obj,
IxbElement elem,
Importer imp)
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:
obj
- elem
- imp
-
- Returns:
- Object
- Throws:
WTException
getOid
private ObjectIdentifier getOid(Object obj)
throws WTException
- Throws:
WTException
getId
private Long getId(Object obj)
throws WTException
- Throws:
WTException