Package wt.ixb.publicforapps
Class ApplicationExportHandlerTemplate
java.lang.Object
wt.ixb.publicforapps.ApplicationExportHandlerTemplate
- All Implemented Interfaces:
ApplicationExpImportHandler,ApplicationExportHandler
- Direct Known Subclasses:
ApplicationExportHandlerForJar,ApplicationExportHandlerForXml,PDXExportHandler
Class extends
Supported API: true
Extendable: true
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
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddObjectToManifest(String userObjImage) Adds to manifest's object list
Supported API: truevoidfinalizeAdditionalInfo
Supported API: truelongReturns the current size of the exported contents
Supported API: trueReturns the value of the current IX application context.Returns the id of Objects exported.Get the output file after export.Get the output file after export.longReturns the space required to store the object specified.Getter for target version for export
Supported API: truevoidInitialize
Supported API: truebooleanGet the flag as true or false respectively based on if multi thread Export is applicable or not.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".voidsetIXApplicationContext(IXApplicationContext appContext) Sets the value of the IX application context.voidsetTargetVersion(String targetVersion) Setter for target version for export.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(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.voidstoreLogMessage(String resourceBundle, String messageKey, Object[] textInserts) Supplies the localized log message for the application.voidstoreLogMessage(String resourceBundle, String messageKey, Object[] textInserts, int importanceLevel) Supplies the localized log message for the application.
-
Method Details
-
isMultithreadedExportApplicable
public boolean isMultithreadedExportApplicable()Get the flag as true or false respectively based on if multi thread Export is applicable or not.
Supported API: true- Returns:
- boolean
-
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- Specified by:
storeDocumentin interfaceApplicationExportHandler- 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- Specified by:
storeDocumentin interfaceApplicationExportHandler- 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- Specified by:
storeDocumentin interfaceApplicationExportHandler- 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- Specified by:
storeContentin interfaceApplicationExportHandler- 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- Specified by:
storeContentin interfaceApplicationExportHandler- 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- Specified by:
storeContentin interfaceApplicationExportHandler- Parameters:
file-filename-- 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 bystoreContent (Object contentAttr).
Supported API: true- Specified by:
reallyStoreContentin interfaceApplicationExportHandler- 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
public 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- Specified by:
reallyStoreContentin interfaceApplicationExportHandler- 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
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:
storeAdditionalInfoin interfaceApplicationExportHandler- Parameters:
object-fileXML-fileId-- Throws:
WTException
-
finalizeAdditionalInfo
finalizeAdditionalInfo
Supported API: true- Specified by:
finalizeAdditionalInfoin interfaceApplicationExportHandler- 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:
storeLogMessagein interfaceApplicationExpImportHandler- Parameters:
resourceBundle-messageKey-textInserts-importanceLevel-- Throws:
WTException
-
storeLogMessage
public void storeLogMessage(String resourceBundle, String messageKey, Object[] textInserts) throws WTException Supplies the localized log message for the application.
Supported API: true- Parameters:
resourceBundle-messageKey-textInserts-- Throws:
WTException
-
getCurrentExportContentSize
Returns the current size of the exported contents
Supported API: true- Returns:
- The current size of the exported objects.
- Throws:
WTException
-
getRequiredExportSize
Returns the space required to store the object specified.
Supported API: true- Parameters:
obj- Object to be stored.- Returns:
- Required space to store the object specified.
- Throws:
WTException
-
getOutput
Get the output file after export.
Supported API: true- Returns:
- Export file output
- Throws:
WTException
-
getOutputs
Get the output file after export.
Supported API: true- Returns:
- Multiple export files.
- Throws:
WTException
-
initialize
Initialize
Supported API: true- Throws:
WTException
-
getObjectListForManifest
Returns the id of Objects exported.
Supported API: true- Returns:
- Collection of object id which have been exported.
- Throws:
WTException
-
addObjectToManifest
Adds to manifest's object list
Supported API: true- Parameters:
userObjImage-
-
getTargetVersion
Getter for target version for export
Supported API: true- Parameters:
String- The string representation of the target export version.
-
setTargetVersion
Setter for target version for export. Currently will have no implication in the export other than an entry in the manifest.
Supported API: true- Parameters:
String- The string representation of the target export version.
-
setIXApplicationContext
Sets the value of the IX application context.
Supported API: true- Parameters:
appContext-
-
getIXApplicationContext
Returns the value of the current IX application context.
Supported API: true- Returns:
-