wt.ixb.publicforapps
Class ApplicationExportHandlerTemplate

java.lang.Object
  extended bywt.ixb.publicforapps.ApplicationExportHandlerTemplate
All Implemented Interfaces:
ApplicationExpImportHandler, ApplicationExportHandler
Direct Known Subclasses:
ApplicationExportHandlerForJar, PDXExportHandler, ReplIxbExportHandler

public class ApplicationExportHandlerTemplate
extends Object
implements ApplicationExportHandler

Class extends ApplicationExportHandler interface with trivial implementations. It can be used by application to make application less dependent of future extension of ApplicationExportHandler interface.

Supported API: true

Extendable: true


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
 
Fields inherited from interface wt.ixb.publicforapps.ApplicationExpImportHandler
IMPORTANCE_LEVEL_DEFAULT
 
Constructor Summary
ApplicationExportHandlerTemplate()
           
 
Method Summary
 void finalizeAdditionalInfo()
          

Supported API: true
 void reallyStoreContent(Object contentHolder, Exporter exporter, InputStream content, String contentId)
          Stores the given content of the content parameter "contentAttr".
 void storeAdditionalInfo(Object object, IxbDocument fileXML, String fileId)
          Stores additional information related to object and its XML representation.
 String storeContent(File file)
          Stores content files residing in the local file system (as in the case of Representation objects).
 String storeContent(Object contentAttr)
          Stores the given content of exported object.
 String storeDocument(IxbElement elem)
          Stores the given XML element, which is the XML representation of exported object, based on Windchill's default DTD for export.
 String storeDocument(IxbElement elem, String dtd)
          Stores the given XML element, which is the XML representation of exported object, based on the provided DTD.
 void storeLogMessage(String resourceBundle, String messageKey, Object[] textInserts)
           
 void storeLogMessage(String resourceBundle, String messageKey, Object[] textInserts, int importanceLevel)
          Supplies the localized log message for the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

ApplicationExportHandlerTemplate

public ApplicationExportHandlerTemplate()
Method Detail

storeDocument

public String storeDocument(IxbElement elem)
                     throws WTException
Stores the given XML element, which is the XML representation of exported object, based on Windchill's default DTD for export. Return XML file name or some other string identifier for the stored element.

Supported API: true

Specified by:
storeDocument in interface ApplicationExportHandler
Parameters:
elem -
Returns:
String
Throws:
WTException
See Also:
storeDocument (IxbElement elem, String dtd)

storeDocument

public String storeDocument(IxbElement elem,
                            String dtd)
                     throws WTException
Stores the given XML element, which is the XML representation of exported object, based on the provided DTD. If parameter dtd is null, Windchill's default DTD is assumed. Return XML file name or some other string identifier for the stored element.

Supported API: true

Specified by:
storeDocument in interface ApplicationExportHandler
Parameters:
elem -
dtd -
Returns:
String
Throws:
WTException
See Also:
storeDocument (IxbElement elem)

storeContent

public String storeContent(Object contentAttr)
                    throws WTException
Stores the given content of exported object. The return value is String, that will be used in XML file as an identifier of this content. Application should be able to find the content during the import process by this identifier. The content of the associated object might not be saved, depending on the implementation of the this interface.

Supported API: true

Specified by:
storeContent in interface ApplicationExportHandler
Parameters:
contentAttr - The content attribute which is related to InputStream or BLOB. e.g. it can be ApplicationData , File or String (full path of a file), etc
Returns:
String
Throws:
WTException

storeContent

public String storeContent(File file)
                    throws WTException
Stores content files residing in the local file system (as in the case of Representation objects).

Supported API: true

Specified by:
storeContent in interface ApplicationExportHandler
Parameters:
file -
Returns:
String
Throws:
WTException

reallyStoreContent

public void reallyStoreContent(Object contentHolder,
                               Exporter exporter,
                               InputStream content,
                               String contentId)
                        throws WTException
Stores the given content of the content parameter "contentAttr". The parameter "contentId" is the unique content ID which was previously computed and returned by storeContent (Object contentAttr).

Supported API: true

Specified by:
reallyStoreContent in interface ApplicationExportHandler
Parameters:
contentHolder - The object holding the attribute (directly or indirectly) "contentAttr".
exporter -
content - The content as InputStream which is associated with the contentId.
contentId - The unique content ID which was previously computed by calling "storeContent (Object contentAttr)"
Throws:
WTException

storeAdditionalInfo

public void storeAdditionalInfo(Object object,
                                IxbDocument fileXML,
                                String fileId)
                         throws WTException
Stores additional information related to object and its XML representation.

Supported API: true

Specified by:
storeAdditionalInfo in interface ApplicationExportHandler
Parameters:
object -
fileXML -
fileId -
Throws:
WTException

finalizeAdditionalInfo

public void finalizeAdditionalInfo()
                            throws WTException


Supported API: true

Specified by:
finalizeAdditionalInfo in interface ApplicationExportHandler
Throws:
WTException

storeLogMessage

public void storeLogMessage(String resourceBundle,
                            String messageKey,
                            Object[] textInserts,
                            int importanceLevel)
                     throws WTException
Supplies the localized log message for the application.

Supported API: true

Specified by:
storeLogMessage in interface ApplicationExpImportHandler
Parameters:
resourceBundle -
messageKey -
textInserts -
importanceLevel -
Throws:
WTException

storeLogMessage

public void storeLogMessage(String resourceBundle,
                            String messageKey,
                            Object[] textInserts)
                     throws WTException
Throws:
WTException