wt.query.template
Class ExpImpForReportTemplate

java.lang.Object
  extended bywt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
      extended bywt.ixb.publicforhandlers.ClassExporterImporterTemplate
          extended bywt.query.template.ExpImpForReportTemplate
All Implemented Interfaces:
ClassExporter, ClassExporterImporter, ElementImporter

public class ExpImpForReportTemplate
extends ClassExporterImporterTemplate


Nested Class Summary
 
Nested classes inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
ClassExporterImporterTemplate.ContentHolderCommitListener
 
Field Summary
private static boolean DEBUG
           
static String XML_ATTR_DELEGATIONSPEC
           
static String XML_ATTR_DESCRIPTION
           
static String XML_ATTR_NAME
           
static String XML_ATTR_URLSPEC
           
static String XML_ATTR_XML
           
static String XML_ATTR_XSLSPEC
           
static String XML_ATTR_XSLTYPE
           
static String XML_REPORT_TEMPLATE
           
static String XSL_DELEGATION_SPEC
           
static String XSL_URL_SPEC
           
 
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
 
Fields inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
CONFLICT_RESOURCE
 
Constructor Summary
ExpImpForReportTemplate()
           
 
Method Summary
 void checkConflicts(IxbElement fileXML, Importer importer)
          Checks conflicts that can arise while import process.
 Object createObject(IxbElement fileXML, Importer importer)
          Creates new instance of Windchill object.
 void exportObject(Object object, Exporter exporter)
          Exports the specified object in context given by parameter exporter.
 Object findAmongExistingObjects(IxbElement fileXML, Importer importer)
          Implements typical way of finding whether object from given XML file exists already in Windchill database.
 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.
 Object importObjectAttributes(Object ob, IxbElement fileXML, Importer importer)
          Imports class specific atributes from the XML file.
 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.
private static void PP(String s)
           
private static void printout(String s)
           
 Object storeObject(Object object, IxbElement fileXML, Importer importer)
          That is the general template how to store object.
 
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplate
createFileXMLOnExport, exportAttributes, finalizeImportObject, getRootTag, importElement, isObjectIgnored, isObjectNew, outputLog, rememberNewObInfo, setObjectIgnored, setObjectIsNew, storeAdditionalInfo, storeElement
 
Methods inherited from class wt.ixb.publicforhandlers.ClassExporterImporterTemplateGeneral
finalizeCheckConflicts, finalizeExport, finalizeImport, getAdditionalImportPriority, prepareForCheckConflicts, prepareForImport, previewElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_REPORT_TEMPLATE

public static final String XML_REPORT_TEMPLATE
See Also:
Constant Field Values

XML_ATTR_NAME

public static final String XML_ATTR_NAME
See Also:
Constant Field Values

XML_ATTR_DESCRIPTION

public static final String XML_ATTR_DESCRIPTION
See Also:
Constant Field Values

XML_ATTR_XML

public static final String XML_ATTR_XML
See Also:
Constant Field Values

XML_ATTR_XSLTYPE

public static final String XML_ATTR_XSLTYPE
See Also:
Constant Field Values

XML_ATTR_XSLSPEC

public static final String XML_ATTR_XSLSPEC
See Also:
Constant Field Values

XML_ATTR_DELEGATIONSPEC

public static final String XML_ATTR_DELEGATIONSPEC
See Also:
Constant Field Values

XML_ATTR_URLSPEC

public static final String XML_ATTR_URLSPEC
See Also:
Constant Field Values

XSL_DELEGATION_SPEC

public static final String XSL_DELEGATION_SPEC
See Also:
Constant Field Values

XSL_URL_SPEC

public static final String XSL_URL_SPEC
See Also:
Constant Field Values

DEBUG

private static boolean DEBUG
Constructor Detail

ExpImpForReportTemplate

public ExpImpForReportTemplate()
Method Detail

exportObject

public void exportObject(Object object,
                         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:
object -
exporter - The Exporter instance that represents the context of the export operation.
Throws:
WTException

checkConflicts

public void checkConflicts(IxbElement fileXML,
                           Importer importer)
                    throws WTException
Description copied from class: ClassExporterImporterTemplateGeneral
Checks conflicts that can arise while import process.

Supported API: true

Specified by:
checkConflicts in interface ElementImporter
Overrides:
checkConflicts in class ClassExporterImporterTemplateGeneral
Parameters:
fileXML - the XML element to be imported.
importer - The Importer instance that represents the context of the import operation.
Throws:
WTException

findAmongExistingObjects

public Object findAmongExistingObjects(IxbElement fileXML,
                                       Importer importer)
                                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:
fileXML -
importer -
Returns:
Object
Throws:
WTException

createObject

public Object createObject(IxbElement fileXML,
                           Importer importer)
                    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:
fileXML -
importer -
Returns:
Object
Throws:
WTException

importObjectAttributes

public Object importObjectAttributes(Object ob,
                                     IxbElement fileXML,
                                     Importer importer)
                              throws WTException
Description copied from class: ClassExporterImporterTemplate
Imports class specific atributes from the XML file. This method should be implemented for most of the class handlers. If the object class inherits from another replicated class (for example, inherits from WTPart) then it generally should give a new implementation for this method; in this implementation it should at first call importObjectAttributes of its ansector

Supported API: true

Overrides:
importObjectAttributes in class ClassExporterImporterTemplate
Parameters:
ob -
fileXML -
importer -
Returns:
Object
Throws:
WTException

storeObject

public Object storeObject(Object object,
                          IxbElement fileXML,
                          Importer importer)
                   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:
object -
fileXML -
importer -
Returns:
Object
Throws:
WTException

importObjectAttributesAfterStore

public Object importObjectAttributesAfterStore(Object object,
                                               IxbElement fileXML,
                                               Importer importer)
                                        throws WTException
Description copied from class: ClassExporterImporterTemplate
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. So, we can not set this attribute in importObjectAttributes method because it is called before store object.
If class inherits from another replicated class (for example, inherits from 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

Supported API: true

Overrides:
importObjectAttributesAfterStore in class ClassExporterImporterTemplate
Parameters:
object -
fileXML -
importer -
Returns:
Object
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

getObjectDisplayID

public String getObjectDisplayID(IxbElement fileXML,
                                 Importer importer)
                          throws WTException
Description copied from class: ClassExporterImporterTemplateGeneral
Return the localized identity of the element that will be used in import operation. This is mostly for localized log purpose.

Supported API: true

Specified by:
getObjectDisplayID in interface ElementImporter
Overrides:
getObjectDisplayID in class ClassExporterImporterTemplateGeneral
Parameters:
fileXML - the XML element to be imported.
importer - The Importer instance that represents the context of the import operation.
Returns:
String
Throws:
WTException

PP

private static void PP(String s)

printout

private static void printout(String s)