|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
wt.ixb.publicforhandlers.ClassExporterImporterTemplate
wt.ixb.handlers.forclasses.ExpImpForClassificationNode
Supported API: true
Extendable: true
Nested Class Summary |
Nested classes inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate |
ClassExporterImporterTemplate.ContentHolderCommitListener |
Field Summary | |
private static String |
CLASSNAME
|
static String |
EXPORTED_CLASSIFICATION_NODE
|
private static String |
RESOURCE
|
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate |
|
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral |
CONFLICT_RESOURCE |
Constructor Summary | |
ExpImpForClassificationNode()
|
Method Summary | |
private void |
checkConflictForClassificationStruct(ClassificationNodeDefaultView existingV,
ClassificationNode existingNode,
IxbElement fileXML,
Importer importer)
Check the conflicts for the ClassificationStruct for the ClassificationNode found from database against the XML file in the jar. |
private void |
checkConflictForNodeAttributes(ClassificationNodeDefaultView existingView,
IxbElement fileXML,
Importer importer)
Check the conflicts for the ClassificationNode found from database against the XML file. |
void |
checkConflicts(IxbElement fileXML,
Importer importer)
Check conflicts for the XML file against the ClassificationNode
object in datase. |
private ClassificationNodeDefaultView |
createClassificationNode(IxbElement fileXML,
Importer importer)
To create a brand new ClassificationNode instance and persisted into database absed on the information provided by the XML file |
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. |
private void |
exportClassificationStruct(ClassificationNode node,
IxbElement fileXML,
Exporter exporter)
|
private void |
exportImageHolder(ClassificationNodeDefaultView defV,
ClassificationNode node,
IxbElement fileXML,
Exporter exporter)
|
Object |
findAmongExistingObjects(IxbElement fileXML,
Importer importer)
Find the ClassificationNode instance in database based
on the name and path. |
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 |
getAdditionalImportPriority(IxbElement fileXML)
Return the "additional" import priority based on the XML file, supplemented to getImportPriority()
The returned number defines the order in which XML file will be imported
if getImportPriority() returns the same value. |
private ClassificationNodeDefaultView |
getClassificationNodeDefaultViewByPath(String nodePath)
Find the ClassificationNodeDefaultView by full path. |
private ClassificationStructDefaultView |
getClassificationStructDefaultView(String className,
String ibaPath)
Get the ClassificationStructDefaultView according to the primary className. |
private String |
getFullPath(ClassificationNodeDefaultView defV)
|
int |
getImportPriority()
Return the import priority of the object type represented by this import handler. |
String |
getObjectDisplayID(IxbElement fileXML,
Importer importer)
Return the localized identity of the element that will be used in import operation. |
private Vector |
getParentNodes(ClassificationNode node)
|
private String |
getParentPath(ClassificationNode node)
|
protected String |
getRootTag()
Returns "ClassificationNode" as the root tag of the XML file. |
Object |
importElement(IxbElement fileXML,
Importer importer)
Imports XML element in context given by importer parameter. |
Object |
importObjectAttributesAfterStore(Object object,
IxbElement fileXML,
Importer importer)
Imports class specific atributes from the XML element after object gets stored This method should be implemented for most of the classes This method is required because some of attributes (IBA, Content) can not be added to the object before it gets stored. |
void |
outputLog(Object ob,
Importer importer)
Output log for imported object. |
private static void |
PP(String s)
|
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate |
createFileXMLOnExport, exportObject, finalizeImportObject, importObjectAttributes, isObjectIgnored, isObjectNew, rememberNewObInfo, setObjectIgnored, setObjectIsNew, storeAdditionalInfo, storeElement, storeObject |
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral |
finalizeCheckConflicts, finalizeExport, finalizeImport, prepareForCheckConflicts, prepareForImport, previewElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String EXPORTED_CLASSIFICATION_NODE
Constructor Detail |
public ExpImpForClassificationNode()
Method Detail |
protected String getRootTag()
getRootTag
in class ClassExporterImporterTemplate
protected void exportAttributes(Object object, IxbDocument fileXML, Exporter exporter) throws WTException
createFileXMLOnExport(Exporter
exporter)
.
exportAttributes
in class ClassExporterImporterTemplate
object
- fileXML
- exporter
-
WTException
public Object findAmongExistingObjects(IxbElement fileXML, Importer importer) throws WTException
ClassificationNode
instance in database based
on the name and path.
findAmongExistingObjects
in class ClassExporterImporterTemplate
fileXML
- importer
-
WTException
public void checkConflicts(IxbElement fileXML, Importer importer) throws WTException
ClassificationNode
object in datase.
checkConflicts
in interface ElementImporter
checkConflicts
in class ClassExporterImporterTemplateGeneral
fileXML
- importer
-
WTException
public int getAdditionalImportPriority(IxbElement fileXML) throws WTException
getImportPriority()
The returned number defines the order in which XML file will be imported
if getImportPriority() returns the same value.
In general, if getImportPriority() returns a smaller value, it will
have a higher import priority;
for the XML files with the same value of getImportPriority(), the
one with a smaller value of getAdditionalImportPriority()
will have a higher import priority.ClassificationNode
instance
getAdditionalImportPriority
in interface ElementImporter
getAdditionalImportPriority
in class ClassExporterImporterTemplateGeneral
fileXML
-
WTException
public Object importElement(IxbElement fileXML, Importer importer) throws WTException
ClassificationNodeDefaultView
, which might be newly
created or already existed in the datastore.
importElement
in interface ElementImporter
importElement
in class ClassExporterImporterTemplate
fileXML
- importer
-
WTException
public Object createObject(IxbElement fileXML, Importer importer) throws WTException
createObject
in class ClassExporterImporterTemplate
fileXML
- importer
-
WTException
public int getImportPriority() throws WTException
ClassExporterImporterTemplateGeneral
getImportPriority
in interface ElementImporter
getImportPriority
in class ClassExporterImporterTemplateGeneral
WTException
private String getParentPath(ClassificationNode node) throws WTException
WTException
private String getFullPath(ClassificationNodeDefaultView defV) throws WTException
WTException
private Vector getParentNodes(ClassificationNode node) throws WTException
WTException
private void exportImageHolder(ClassificationNodeDefaultView defV, ClassificationNode node, IxbElement fileXML, Exporter exporter) throws WTException
WTException
private void exportClassificationStruct(ClassificationNode node, IxbElement fileXML, Exporter exporter) throws WTException
WTException
private ClassificationNodeDefaultView getClassificationNodeDefaultViewByPath(String nodePath) throws WTException
WTException
public String getObjectDisplayID(IxbElement fileXML, Importer importer) throws WTException
ClassExporterImporterTemplateGeneral
getObjectDisplayID
in interface ElementImporter
getObjectDisplayID
in class ClassExporterImporterTemplateGeneral
fileXML
- the XML element to be imported.importer
- The Importer
instance that represents the context of the import operation.
WTException
private void checkConflictForNodeAttributes(ClassificationNodeDefaultView existingView, IxbElement fileXML, Importer importer) throws WTException
existingView
- fileXML
- importer
-
WTException
private void checkConflictForClassificationStruct(ClassificationNodeDefaultView existingV, ClassificationNode existingNode, IxbElement fileXML, Importer importer) throws WTException
existingV
- existingNode
- fileXML
- importer
-
WTException
private ClassificationNodeDefaultView createClassificationNode(IxbElement fileXML, Importer importer) throws WTException
fileXML
- importer
-
WTException
public Object importObjectAttributesAfterStore(Object object, IxbElement fileXML, Importer importer) throws WTException
ClassExporterImporterTemplate
importObjectAttributes
method
because it is called before store object.
WTPart
)
then for this class generally a new implementation of this method
should be given;
in this implementation it should at first call importObjectAttributesAfterStore()
of its ansector
importObjectAttributesAfterStore
in class ClassExporterImporterTemplate
object
- fileXML
- importer
-
WTException
private ClassificationStructDefaultView getClassificationStructDefaultView(String className, String ibaPath) throws WTException
WTException
public void outputLog(Object ob, Importer importer) throws WTException
ClassExporterImporterTemplateGeneral
outputLog
in interface ElementImporter
outputLog
in class ClassExporterImporterTemplate
WTException
private Object findAmongExistingObjectsForImport(IxbElement fileXML, Importer importer) throws WTException
ClassExporterImporterTemplate
WTException
private static void PP(String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |