Package wt.ixb.publicforapps
Interface ApplicationExportHandler
- All Superinterfaces:
ApplicationExpImportHandler
- All Known Implementing Classes:
ApplicationExportHandlerForJar,ApplicationExportHandlerForXml,ApplicationExportHandlerTemplate,PDXExportHandler
This is the base class for export application handlers.
Any export application must supply for export service such a handler to store exported information. IXB service by itself knows nothing about how to store generated XML files. It completely relies here on the handler, supplied by export application.
Supported API: true
Extendable: false
Any export application must supply for export service such a handler to store exported information. IXB service by itself knows nothing about how to store generated XML files. It completely relies here on the handler, supplied by export application.
There are two different types of the information, that should be stored in the export process:
- XML elements, which are the XML representation of exported objects (of objects' meta data)
- objects' contents - for objects, that are content holders (
ContentHolder), e.g.WTDocument
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Supported API: truevoidFinalize objects store, per Object exported.voidreallyStoreContent(Object contentHolder, Exporter exporter, InputStream content, long contentSize, String contentId) Stores the given content of the content parameter "contentAttr".voidreallyStoreContent(Object contentHolder, Exporter exporter, InputStream content, String contentId) Stores the given content of the content parameter "contentAttr".voidstoreAdditionalInfo(Object object, IxbDocument fileXML, String fileId) Stores additional information related to object and its XML representation.storeContent(File file) Stores content files residing in the local file system (as in the case of Representation objects).storeContent(File file, String filename) Stores content files residing in the local file system (as in the case of Representation objects).storeContent(File file, String filename, boolean deleteAfterStore) Stores content files residing in the local file system (as in the case of Representation objects).storeContent(Object contentAttr) Stores the given content of exported object.storeDocument(IxbElement elem) Stores the given XML element, which is the XML representation of exported object, based on Windchill's default DTD for export.storeDocument(IxbElement elem, ByteArrayOutputStream bos) Stores the given ByteArrayOutputStream, which is the XML representation of exported object, based on the provided DTD.storeDocument(IxbElement elem, String dtd) Stores the given XML element, which is the XML representation of exported object, based on the provided DTD.Methods inherited from interface wt.ixb.publicforapps.ApplicationExpImportHandler
storeLogMessage
-
Method Details
-
storeDocument
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- Parameters:
elem-- Returns:
- String
- Throws:
WTException- See Also:
-
storeDocument (IxbElement elem, String dtd)
-
storeDocument
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- Parameters:
elem-dtd-- Returns:
- String
- Throws:
WTException- See Also:
-
storeDocument (IxbElement elem)
-
storeDocument
Stores the given ByteArrayOutputStream, which is the XML representation of exported object, based on the provided DTD. Return XML file name or some other string identifier for the stored element.
Supported API: true- Parameters:
elem-bos-- Returns:
- String
- Throws:
WTException- See Also:
-
storeDocument (IxbElement elem)
-
storeContent
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- Parameters:
contentAttr- The content attribute which is related to InputStream or BLOB. e.g. it can beApplicationData, File or String (full path of a file), etc- Returns:
- String
- Throws:
WTException
-
storeContent
Stores content files residing in the local file system (as in the case of Representation objects).
Supported API: true- Parameters:
file-- Returns:
- String
- Throws:
WTException
-
storeContent
Stores content files residing in the local file system (as in the case of Representation objects).
Supported API: true- Parameters:
file-filename-- Returns:
- String
- Throws:
WTException
-
storeContent
Stores content files residing in the local file system (as in the case of Representation objects). Whether to perform a cleanup when done with the file is denoted by a boolean flag.
Supported API: true- Parameters:
file- Local filefilename- File namedeleteAfterStore- Whether the file should be deleted after store.- Returns:
- String
- Throws:
WTException
-
reallyStoreContent
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 bystoreContent (Object contentAttr).
Supported API: true- 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
-
reallyStoreContent
void reallyStoreContent(Object contentHolder, Exporter exporter, InputStream content, long contentSize, 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 bystoreContent (Object contentAttr). *
Supported API: true- Parameters:
contentHolder- The object holding the attribute (directly or indirectly) "contentAttr".exporter-content- The content as InputStream which is associated with the contentId.contentSize- The size of content in bytes.contentId- The unique content ID which was previously computed by calling "storeContent (Object contentAttr)"- Throws:
WTException
-
storeAdditionalInfo
Stores additional information related to object and its XML representation.
Supported API: true- Parameters:
object-fileXML-fileId-- Throws:
WTException
-
finalizeAdditionalInfo
Supported API: true- Throws:
WTException
-
finalizeStore
Finalize objects store, per Object exported.
Supported API: true- Throws:
WTException
-