Package wt.ixb.publicforapps
Class ApplicationExportHandlerForXml
java.lang.Object
wt.ixb.publicforapps.ApplicationExportHandlerTemplate
wt.ixb.publicforapps.ApplicationExportHandlerForXml
- All Implemented Interfaces:
ApplicationExpImportHandler,ApplicationExportHandler
This class provides methods for storing XML with JAXB object and content files in export jar file. It handles both
ApplicationData content and content residing in local file system.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationExportHandlerForXml(File fileToSave, File dirToSave)
Supported API: true -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObjectToManifest(String userObjImage) Adds to manifest's object list
Supported API: truevoidCreate the manifest file in the jar.voidcreateManifest(File manifestFile, String fileName) Create the manifest file in the jar.voidfinalizeExport(boolean outcome) do finalize actions before export is finished, current only call cleanTempDirGets the value of the attribute: jarFile; The jar file to store exportedinformation (meta data and content data)
Supported API: trueReturns the id of Objects exported.protected FileGets the value of the attribute: saveDir; Directory where the jar file will be stored.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 format type for export.storeDocument(IxbElement doc, String schema) 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.Methods inherited from class wt.ixb.publicforapps.ApplicationExportHandlerTemplate
getCurrentExportContentSize, getIXApplicationContext, getOutputs, getRequiredExportSize, getTargetVersion, initialize, isMultithreadedExportApplicable, reallyStoreContent, setIXApplicationContext, setTargetVersion, storeDocument
-
Constructor Details
-
ApplicationExportHandlerForXml
Supported API: true- Parameters:
fileToSave- The jar file to store exportedinformation (meta data and content data)dirToSave- Directory where the jar file will be stored.- Throws:
WTException
-
-
Method Details
-
finalizeExport
do finalize actions before export is finished, current only call cleanTempDir- Overrides:
finalizeExportin classApplicationExportHandlerTemplate- Parameters:
outcome-
Supported API: true *- Throws:
WTException
-
getJarFile
Gets the value of the attribute: jarFile; The jar file to store exportedinformation (meta data and content data)
Supported API: true- Overrides:
getJarFilein classApplicationExportHandlerTemplate- Returns:
- File
-
getSaveDir
Gets the value of the attribute: saveDir; Directory where the jar file will be stored.
Supported API: true- Returns:
- File
-
createManifest
Create the manifest file in the jar. The content of the manifest file will copy the information as accumulated by calling the methodaddObjectToManifest (String userObjImage).
Supported API: true *- Throws:
WTException
-
createManifest
Create the manifest file in the jar. The manifest file will copy the contents in theFilefile.
Supported API: true *- Overrides:
createManifestin classApplicationExportHandlerTemplate- Throws:
WTException
-
storeDocument
Stores the given XML element, which is the XML representation of exported object, based on format type for export. Return XML file name or some other string identifier for the stored element.
Supported API: true- Specified by:
storeDocumentin interfaceApplicationExportHandler- Overrides:
storeDocumentin classApplicationExportHandlerTemplate- 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- Overrides:
storeDocumentin classApplicationExportHandlerTemplate- Parameters:
elem-schema-- 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- Overrides:
storeContentin classApplicationExportHandlerTemplate- 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- Overrides:
storeContentin classApplicationExportHandlerTemplate- 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- Overrides:
storeContentin classApplicationExportHandlerTemplate- Parameters:
file-filename-- Returns:
- String
- 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- Overrides:
storeLogMessagein classApplicationExportHandlerTemplate- Parameters:
resourceBundle-messageKey-textInserts-- 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- Overrides:
storeLogMessagein classApplicationExportHandlerTemplate- Parameters:
resourceBundle-messageKey-textInserts-importanceLevel-- Throws:
WTException
-
getObjectListForManifest
Returns the id of Objects exported.
Supported API: true- Overrides:
getObjectListForManifestin classApplicationExportHandlerTemplate- Returns:
- Collection of object id which have been exported.
- Throws:
WTException
-
addObjectToManifest
Adds to manifest's object list
Supported API: true- Overrides:
addObjectToManifestin classApplicationExportHandlerTemplate- Parameters:
userObjImage-
-