wt.ixb.handlers.netmarkets
Class NotebookIXHandler

java.lang.Object
  extended bywt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
      extended bywt.ixb.publicforhandlers.ClassExporterImporterTemplate
          extended bywt.ixb.handlers.netmarkets.NotebookIXHandler
All Implemented Interfaces:
ClassExporter, ClassExporterImporter, ElementImporter

public class NotebookIXHandler
extends ClassExporterImporterTemplate

This class is the import handler for NotebookSpec. The DTD for the object is as follows:

 

 

 

 

 

 
 


Nested Class Summary
 
Nested classes inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
ClassExporterImporterTemplate.ContentHolderCommitListener
 
Field Summary
private static String _rb
           
(package private)  ResourceBundle resources
           
private static NMProjectConstants.ForumAndNotebookSpecInfo specTags
           
 
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
 
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
CONFLICT_RESOURCE
 
Constructor Summary
NotebookIXHandler()
           
 
Method Summary
 Object createBookmark(IxbElement elem, Importer imp, CollaborationContainer container)
          
 Object createNotebook(IxbElement elem, Importer imp)
           
 Object createNotebookFolder(IxbElement elem, Importer imp, CollaborationContainer parent)
          
 Object createObject(IxbElement elem, Importer imp)
          Creates new instance of Windchill object.
 void exportBookmark(Bookmark bookmark, IxbElement bookmarkElement, Exporter exporter)
          
 void exportNotebook(Notebook notebook, IxbElement notebook_elem, Exporter exporter)
          
 void exportNotebookFolder(NotebookFolder folder, IxbElement folder_elem, Exporter exporter, String folder_path)
          
 void exportObject(Object obj, Exporter exporter)
          Exports the specified object in context given by parameter exporter.
 void exportSubjectOfNotebook(Object subject, IxbElement notebook_elem, Exporter exporter)
           
 Object findAmongExistingObjects(IxbElement elem, Importer imp)
          Implements typical way of finding whether object from given XML file exists already in Windchill database.
private  String getDefaultName()
           
private  ObjectIdentifier getId(Object obj)
           
 int getImportPriority()
          Return the import priority of the object type represented by this import handler.
private  Notebook getNotebook()
           
private  CollaborationContainer getParent(String folder_path)
           
private  NotebookFolder getSubFolder(CollaborationContainer container, String folder_name)
           
 Object storeObject(Object ob, 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 wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
checkConflicts, finalizeCheckConflicts, finalizeExport, finalizeImport, getAdditionalImportPriority, getObjectDisplayID, prepareForCheckConflicts, prepareForImport, previewElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rb

private static final String _rb
See Also:
Constant Field Values

specTags

private static final NMProjectConstants.ForumAndNotebookSpecInfo specTags

resources

ResourceBundle resources
Constructor Detail

NotebookIXHandler

public NotebookIXHandler()
Method Detail

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: 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

exportNotebook

public void exportNotebook(Notebook notebook,
                           IxbElement notebook_elem,
                           Exporter exporter)
                    throws WTException
 
 

Throws:
WTException

exportSubjectOfNotebook

public void exportSubjectOfNotebook(Object subject,
                                    IxbElement notebook_elem,
                                    Exporter exporter)
                             throws WTException
Throws:
WTException

exportNotebookFolder

public void exportNotebookFolder(NotebookFolder folder,
                                 IxbElement folder_elem,
                                 Exporter exporter,
                                 String folder_path)
                          throws WTException
 
 

Throws:
WTException

exportBookmark

public void exportBookmark(Bookmark bookmark,
                           IxbElement bookmarkElement,
                           Exporter exporter)
                    throws WTException
 
 

Throws:
WTException

createObject

public Object createObject(IxbElement elem,
                           Importer imp)
                    throws WTException
Description copied from class: ClassExporterImporterTemplate
Creates new instance of Windchill object. Every class requires its own method to create object of this class. So, this method must be overriden by any class specific import handler

Supported API: true

Specified by:
createObject in class ClassExporterImporterTemplate
Parameters:
elem -
imp -
Returns:
Object
Throws:
WTException

createNotebook

public Object createNotebook(IxbElement elem,
                             Importer imp)
                      throws WTException
Throws:
WTException

createNotebookFolder

public Object createNotebookFolder(IxbElement elem,
                                   Importer imp,
                                   CollaborationContainer parent)
                            throws WTException
 

 
 

Throws:
WTException

createBookmark

public Object createBookmark(IxbElement elem,
                             Importer imp,
                             CollaborationContainer container)
                      throws WTException
 
 

Throws:
WTException

getDefaultName

private String getDefaultName()

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 ob,
                          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:
ob -
elem -
imp -
Returns:
Object
Throws:
WTException

getParent

private CollaborationContainer getParent(String folder_path)
                                  throws WTException
Throws:
WTException

getSubFolder

private NotebookFolder getSubFolder(CollaborationContainer container,
                                    String folder_name)
                             throws WTException
Throws:
WTException

getNotebook

private Notebook getNotebook()
                      throws WTException
Throws:
WTException

getId

private ObjectIdentifier getId(Object obj)