Class ApplicationExportHandlerTemplate

java.lang.Object
wt.ixb.publicforapps.ApplicationExportHandlerTemplate
All Implemented Interfaces:
ApplicationExpImportHandler, ApplicationExportHandler
Direct Known Subclasses:
ApplicationExportHandlerForJar, ApplicationExportHandlerForXml, PDXExportHandler

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
  • 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

      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)
    • storeDocument

      public String storeDocument(IxbElement elem, ByteArrayOutputStream bos) throws WTException
      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:
      storeDocument in interface ApplicationExportHandler
      Parameters:
      elem -
      bos -
      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
    • storeContent

      public String storeContent(File file, String filename) 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 -
      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 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
    • 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 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.
      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:
      storeAdditionalInfo in interface ApplicationExportHandler
      Parameters:
      object -
      fileXML -
      fileId -
      Throws:
      WTException
    • finalizeAdditionalInfo

      public void finalizeAdditionalInfo() throws WTException
      finalizeAdditionalInfo

      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
      Supplies the localized log message for the application.

      Supported API: true
      Parameters:
      resourceBundle -
      messageKey -
      textInserts -
      Throws:
      WTException
    • getCurrentExportContentSize

      public long getCurrentExportContentSize() throws WTException
      Returns the current size of the exported contents

      Supported API: true
      Returns:
      The current size of the exported objects.
      Throws:
      WTException
    • getRequiredExportSize

      public long getRequiredExportSize(Object obj) throws WTException
      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

      public File getOutput() throws WTException
      Get the output file after export.

      Supported API: true
      Returns:
      Export file output
      Throws:
      WTException
    • getOutputs

      public List<File> getOutputs() throws WTException
      Get the output file after export.

      Supported API: true
      Returns:
      Multiple export files.
      Throws:
      WTException
    • initialize

      public void initialize() throws WTException
      Initialize

      Supported API: true
      Throws:
      WTException
    • getObjectListForManifest

      public Collection<String> getObjectListForManifest() throws WTException
      Returns the id of Objects exported.

      Supported API: true
      Returns:
      Collection of object id which have been exported.
      Throws:
      WTException
    • addObjectToManifest

      public void addObjectToManifest(String userObjImage)
      Adds to manifest's object list

      Supported API: true
      Parameters:
      userObjImage -
    • getTargetVersion

      public String getTargetVersion()
      Getter for target version for export

      Supported API: true
      Parameters:
      String - The string representation of the target export version.
    • setTargetVersion

      public void setTargetVersion(String targetVersion)
      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

      public void setIXApplicationContext(IXApplicationContext appContext)
      Sets the value of the IX application context.

      Supported API: true
      Parameters:
      appContext -
    • getIXApplicationContext

      public IXApplicationContext getIXApplicationContext()
      Returns the value of the current IX application context.

      Supported API: true
      Returns: