Class TExportPackageICM

java.lang.Object
  |
  +--TExportPackageICM

public class TExportPackageICM
extends java.lang.Object

Import / Export Package Tool and API
for IBM Information Integrator® v8.2
connector to IBM Content Manager® v8.2

The Export Package object provides the entire API set and options to export and import items from one datastore to another. The object may work with both source and target systems in the same session or may be saved persistantly, copied to a target system around a firewall, loaded, and then imported.

For more information, please refer to the Design Document.


Inner Class Summary
static class TExportPackageICM.ExportOptions
          This object specifies the matrix of export options.
static class TExportPackageICM.ImportOptions
          This object specified the matrix of import options.
static class TExportPackageICM.Options
          This class specifies the core set of options that may be used by both import and export.
 
Field Summary
static int OPTION_CONFLICTS_ALWAYS_NEW
           
static int OPTION_CONFLICTS_UNIQUE_THEN_ERROR
           
static int OPTION_CONFLICTS_UNIQUE_THEN_NEW
           
static int OPTION_CONFLICTS_UNIQUE_THEN_PROMPT
           
static int OPTION_CONFLICTS_UNIQUE_THEN_SKIP
           
static int OPTION_FILE_VERSION_WARNING_EXCEPTION
           
static int OPTION_FILE_VERSION_WARNING_IGNORE
           
static int OPTION_FILE_VERSION_WARNING_PROMPT
           
static int OPTION_FOLDER_CONTENT_EXPORT_ALL_VERSIONS
           
static int OPTION_FOLDER_CONTENT_EXPORT_LATEST_VERSION
           
static int OPTION_FOLDER_CONTENT_PROMPT_ALWAYS
           
static int OPTION_FOLDER_CONTENT_PROMPT_IF_VERSIONS
           
static int OPTION_FOLDER_CONTENT_REMOVE_VALUE
           
static int OPTION_LINKED_ITEMS_EXPORT_ALL_VERSIONS
           
static int OPTION_LINKED_ITEMS_EXPORT_LATEST_VERSION
           
static int OPTION_LINKED_ITEMS_PROMPT_ALWAYS
           
static int OPTION_LINKED_ITEMS_PROMPT_IF_VERSIONS
           
static int OPTION_LINKED_ITEMS_REMOVE_LINK
           
static boolean OPTION_PRINT_DEBUG_DEFAULT
           
static boolean OPTION_PRINT_TRACE_DEFAULT
           
static int OPTION_REFATTR_VALUE_EXPORT_ALL_VERSIONS
           
static int OPTION_REFATTR_VALUE_EXPORT_REFERENCED_VERSION
           
static int OPTION_REFATTR_VALUE_PROMPT_ALWAYS
           
static int OPTION_REFATTR_VALUE_PROMPT_IF_VERSIONS
           
static int OPTION_REFATTR_VALUE_REMOVE_VALUE
           
static int OPTION_SELECTED_ITEM_EXPORT_ALL_VERSIONS
           
static int OPTION_SELECTED_ITEM_EXPORT_SELECTED_VERSION
           
static int OPTION_SELECTED_ITEM_PROMPT_IF_VERSIONS
           
static java.lang.String OPTION_TRACKING_FILE_DEFAULT
           
static java.lang.String OPTION_TRACKING_FILE_EXT
           
static int OPTION_UNIQUENESS_DETECT_THEN_ERROR
           
static int OPTION_UNIQUENESS_DETECT_THEN_PROMPT
           
static int OPTION_UNIQUENESS_PROMPT
           
static int OPTION_UNIQUENESS_USER_SPECIFIED
           
static int OPTION_VERSION_GAP_HANDLING_ELIMINATE_GAPS
           
static int OPTION_VERSION_GAP_HANDLING_ENFORCE_NO_GAPS
           
static int OPTION_VERSION_GAP_HANDLING_PROMPT
           
static java.lang.String T_ICM_EXPORT_PACKAGE_FILE_EXT
           
static java.lang.String T_ICM_EXPORT_PACKAGE_FILE_IDENTIFIER
           
static java.lang.String T_ICM_EXPORT_PACKAGE_TRACKING_FILE_IDENTIFIER
           
static java.lang.String T_ICM_EXPORT_PACKAGE_VERSION
           
 
Constructor Summary
TExportPackageICM(com.ibm.mm.sdk.server.DKDatastoreICM dsICM, java.lang.String queryStr, TExportPackageICM.ExportOptions exportOptions)
          Create an Export Package, loading with initial data set to be obtained by the specified query on the specified datastore.
TExportPackageICM(int numItemsExpected, TExportPackageICM.Options options)
          Create an Export Package with the specified initial hash table size.
TExportPackageICM(java.lang.String centralFileName, TExportPackageICM.ImportOptions importOptions)
          Create an Export Package, loading with dataset that was exported to the specified Export Package file.
 
Method Summary
 void addItem(com.ibm.mm.sdk.common.DKDDO ddo, TExportPackageICM.ExportOptions exportOptions)
          Add Item to Export Package.
 void addItems(com.ibm.mm.sdk.common.dkCollection ddoColl, TExportPackageICM.ExportOptions exportOptions)
          Add items in the collection and all cascading referenced items found in the reference attributes, links, and folder contents.
 void addItems(com.ibm.mm.sdk.server.DKDatastoreICM dsICM, java.lang.String queryStr, TExportPackageICM.ExportOptions exportOptions)
          Add items specified in the query string and all cascading referenced items found in the reference attributes, links, and folder contents.
 com.ibm.mm.sdk.common.DKDDO[] importItems(com.ibm.mm.sdk.server.DKDatastoreICM targetDS, TExportPackageICM.ImportOptions importOptions)
          Import all items added to this package.
 boolean isPackaged(com.ibm.mm.sdk.common.DKDDO ddo, TExportPackageICM.Options options)
          Determine if an Item is in the package.
 void read(java.lang.String centralFileName, TExportPackageICM.ImportOptions importOptions)
          Add the data from the specified export package file to this export package's information.
 com.ibm.mm.sdk.common.DKDDO[] restartImport(java.lang.String trackingFileName, boolean skipIncomplete, com.ibm.mm.sdk.server.DKDatastoreICM targetDS, TExportPackageICM.ImportOptions importOptions)
           Restart a previous import operation that failed or did not complete.
 void write(java.lang.String centralFileName, TExportPackageICM.ExportOptions exportOptions)
          Write Exported Package.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

T_ICM_EXPORT_PACKAGE_FILE_EXT

public static final java.lang.String T_ICM_EXPORT_PACKAGE_FILE_EXT

T_ICM_EXPORT_PACKAGE_VERSION

public static final java.lang.String T_ICM_EXPORT_PACKAGE_VERSION

T_ICM_EXPORT_PACKAGE_FILE_IDENTIFIER

public static final java.lang.String T_ICM_EXPORT_PACKAGE_FILE_IDENTIFIER

T_ICM_EXPORT_PACKAGE_TRACKING_FILE_IDENTIFIER

public static final java.lang.String T_ICM_EXPORT_PACKAGE_TRACKING_FILE_IDENTIFIER

OPTION_VERSION_GAP_HANDLING_ENFORCE_NO_GAPS

public static final int OPTION_VERSION_GAP_HANDLING_ENFORCE_NO_GAPS

OPTION_VERSION_GAP_HANDLING_ELIMINATE_GAPS

public static final int OPTION_VERSION_GAP_HANDLING_ELIMINATE_GAPS

OPTION_VERSION_GAP_HANDLING_PROMPT

public static final int OPTION_VERSION_GAP_HANDLING_PROMPT

OPTION_FILE_VERSION_WARNING_EXCEPTION

public static final int OPTION_FILE_VERSION_WARNING_EXCEPTION

OPTION_FILE_VERSION_WARNING_IGNORE

public static final int OPTION_FILE_VERSION_WARNING_IGNORE

OPTION_FILE_VERSION_WARNING_PROMPT

public static final int OPTION_FILE_VERSION_WARNING_PROMPT

OPTION_CONFLICTS_ALWAYS_NEW

public static final int OPTION_CONFLICTS_ALWAYS_NEW

OPTION_CONFLICTS_UNIQUE_THEN_NEW

public static final int OPTION_CONFLICTS_UNIQUE_THEN_NEW

OPTION_CONFLICTS_UNIQUE_THEN_ERROR

public static final int OPTION_CONFLICTS_UNIQUE_THEN_ERROR

OPTION_CONFLICTS_UNIQUE_THEN_SKIP

public static final int OPTION_CONFLICTS_UNIQUE_THEN_SKIP

OPTION_CONFLICTS_UNIQUE_THEN_PROMPT

public static final int OPTION_CONFLICTS_UNIQUE_THEN_PROMPT

OPTION_UNIQUENESS_DETECT_THEN_ERROR

public static final int OPTION_UNIQUENESS_DETECT_THEN_ERROR

OPTION_UNIQUENESS_DETECT_THEN_PROMPT

public static final int OPTION_UNIQUENESS_DETECT_THEN_PROMPT

OPTION_UNIQUENESS_USER_SPECIFIED

public static final int OPTION_UNIQUENESS_USER_SPECIFIED

OPTION_UNIQUENESS_PROMPT

public static final int OPTION_UNIQUENESS_PROMPT

OPTION_SELECTED_ITEM_EXPORT_SELECTED_VERSION

public static final int OPTION_SELECTED_ITEM_EXPORT_SELECTED_VERSION

OPTION_SELECTED_ITEM_EXPORT_ALL_VERSIONS

public static final int OPTION_SELECTED_ITEM_EXPORT_ALL_VERSIONS

OPTION_SELECTED_ITEM_PROMPT_IF_VERSIONS

public static final int OPTION_SELECTED_ITEM_PROMPT_IF_VERSIONS

OPTION_FOLDER_CONTENT_EXPORT_LATEST_VERSION

public static final int OPTION_FOLDER_CONTENT_EXPORT_LATEST_VERSION

OPTION_FOLDER_CONTENT_EXPORT_ALL_VERSIONS

public static final int OPTION_FOLDER_CONTENT_EXPORT_ALL_VERSIONS

OPTION_FOLDER_CONTENT_REMOVE_VALUE

public static final int OPTION_FOLDER_CONTENT_REMOVE_VALUE

OPTION_FOLDER_CONTENT_PROMPT_IF_VERSIONS

public static final int OPTION_FOLDER_CONTENT_PROMPT_IF_VERSIONS

OPTION_FOLDER_CONTENT_PROMPT_ALWAYS

public static final int OPTION_FOLDER_CONTENT_PROMPT_ALWAYS

OPTION_LINKED_ITEMS_EXPORT_LATEST_VERSION

public static final int OPTION_LINKED_ITEMS_EXPORT_LATEST_VERSION

OPTION_LINKED_ITEMS_EXPORT_ALL_VERSIONS

public static final int OPTION_LINKED_ITEMS_EXPORT_ALL_VERSIONS

OPTION_LINKED_ITEMS_REMOVE_LINK

public static final int OPTION_LINKED_ITEMS_REMOVE_LINK

OPTION_LINKED_ITEMS_PROMPT_IF_VERSIONS

public static final int OPTION_LINKED_ITEMS_PROMPT_IF_VERSIONS

OPTION_LINKED_ITEMS_PROMPT_ALWAYS

public static final int OPTION_LINKED_ITEMS_PROMPT_ALWAYS

OPTION_REFATTR_VALUE_EXPORT_REFERENCED_VERSION

public static final int OPTION_REFATTR_VALUE_EXPORT_REFERENCED_VERSION

OPTION_REFATTR_VALUE_EXPORT_ALL_VERSIONS

public static final int OPTION_REFATTR_VALUE_EXPORT_ALL_VERSIONS

OPTION_REFATTR_VALUE_REMOVE_VALUE

public static final int OPTION_REFATTR_VALUE_REMOVE_VALUE

OPTION_REFATTR_VALUE_PROMPT_IF_VERSIONS

public static final int OPTION_REFATTR_VALUE_PROMPT_IF_VERSIONS

OPTION_REFATTR_VALUE_PROMPT_ALWAYS

public static final int OPTION_REFATTR_VALUE_PROMPT_ALWAYS

OPTION_PRINT_TRACE_DEFAULT

public static final boolean OPTION_PRINT_TRACE_DEFAULT

OPTION_PRINT_DEBUG_DEFAULT

public static final boolean OPTION_PRINT_DEBUG_DEFAULT

OPTION_TRACKING_FILE_EXT

public static final java.lang.String OPTION_TRACKING_FILE_EXT

OPTION_TRACKING_FILE_DEFAULT

public static final java.lang.String OPTION_TRACKING_FILE_DEFAULT
Constructor Detail

TExportPackageICM

public TExportPackageICM(com.ibm.mm.sdk.server.DKDatastoreICM dsICM,
                         java.lang.String queryStr,
                         TExportPackageICM.ExportOptions exportOptions)
                  throws com.ibm.mm.sdk.common.DKException,
                         java.lang.Exception
Create an Export Package, loading with initial data set to be obtained by the specified query on the specified datastore. Add items specified in the query string and all cascading referenced items found in the reference attributes, links, and folder contents.

Parameters:
dsICM - - Connected datastore to export from.
queryStr - - XQPe query string selecting Items to export.
exportoptions - - (Optional) TExportPackageICM.ExportOptions object, 'null' for defaults. Please refer to the ExportOptions constructor information on default settings.

TExportPackageICM

public TExportPackageICM(java.lang.String centralFileName,
                         TExportPackageICM.ImportOptions importOptions)
                  throws com.ibm.mm.sdk.common.DKException,
                         java.lang.Exception
Create an Export Package, loading with dataset that was exported to the specified Export Package file. Additional sets may be loaded afterwards. Duplicate information will be consolidated.

Parameters:
centralFileName - - Central Export Package file responsible an entire saved package state and all files needed.
importOptions - - (Optional) Import Options specified in a TExportPackageICM.ImportOptions object. If 'null' specified, defaults will be used. Please refer to the ImportOptions constructor information on default settings.

TExportPackageICM

public TExportPackageICM(int numItemsExpected,
                         TExportPackageICM.Options options)
Create an Export Package with the specified initial hash table size.

Parameters:
numItemsExpected - - An estimate of the number of items expected. It is recommended to select the number of items directly selected for export. This will determine the initial hashtable size. Selecting a number too small will decrease performance and selecting a number too large will waste memory.
options - - (Optional) Options specified in a TExportPackageICM.Option object, 'null' for defaults. Please refer to the Options constructor information on default settings.
Method Detail

addItem

public void addItem(com.ibm.mm.sdk.common.DKDDO ddo,
                    TExportPackageICM.ExportOptions exportOptions)
             throws com.ibm.mm.sdk.common.DKException,
                    java.lang.Exception
Add Item to Export Package. Only Root DDOs accepted.

Parameters:
ddo - - Root DDO for item.
exportOptions - - (Optional) Export Options specified in a TExportPackageICM.ExportOptions object. Use 'null' for defaults. Please refer to the ExportOptions constructor information on default settings.

addItems

public void addItems(com.ibm.mm.sdk.server.DKDatastoreICM dsICM,
                     java.lang.String queryStr,
                     TExportPackageICM.ExportOptions exportOptions)
              throws com.ibm.mm.sdk.common.DKException,
                     java.lang.Exception
Add items specified in the query string and all cascading referenced items found in the reference attributes, links, and folder contents.

Parameters:
dsICM - - Connected datastore to export from.
queryStr - - XQPe query string selecting Items to export.
exportOptions - - (Optional) Export Options specified in a TExportPackageICM.ExportOptions object. Use 'null' for defaults. Please refer to the ExportOptions constructor information on default settings.

addItems

public void addItems(com.ibm.mm.sdk.common.dkCollection ddoColl,
                     TExportPackageICM.ExportOptions exportOptions)
              throws com.ibm.mm.sdk.common.DKException,
                     java.lang.Exception
Add items in the collection and all cascading referenced items found in the reference attributes, links, and folder contents.

Parameters:
ddoColl - - dkCollection or DKResults collection containing Items.
exportOptions - - (Optional) Export Options specified in a TExportPackageICM.ExportOptions object. Use 'null' for defaults. Please refer to the ExportOptions constructor information on default settings.

importItems

public com.ibm.mm.sdk.common.DKDDO[] importItems(com.ibm.mm.sdk.server.DKDatastoreICM targetDS,
                                                 TExportPackageICM.ImportOptions importOptions)
                                          throws com.ibm.mm.sdk.common.DKException,
                                                 java.lang.Exception
Import all items added to this package. If multiple versions of the same item were imported, they should be imported into multiple versions of the the new item.

Parameters:
targetDS - - Target datastore to import items to.
importOptions - - (Optional) Import Options specified in a TExportPackageICM.ImportOptions object. Use 'null' for defaults. Please refer to the ImportOptions constructor information on default settings.
Returns:
Returns an array of the Root DKDDO objects for the imported items.

isPackaged

public boolean isPackaged(com.ibm.mm.sdk.common.DKDDO ddo,
                          TExportPackageICM.Options options)
                   throws java.lang.Exception
Determine if an Item is in the package.

Parameters:
ddo - - Root DDO for item.
options - - (Optional) Options specified in a TExportPackageICM.Options object. Use 'null' for defaults. Please refer to the Options constructor information on default settings.

read

public void read(java.lang.String centralFileName,
                 TExportPackageICM.ImportOptions importOptions)
          throws com.ibm.mm.sdk.common.DKException,
                 java.lang.Exception
Add the data from the specified export package file to this export package's information. Multiple sets of exported information can be stored in this object. Duplicate information will be consolidated.

Parameters:
centralFileName - - Central Export Package file responsible an entire saved package state and all files needed.
importOptions - - (Optional) Import Options specified in a TExportPackageICM.ImportOptions object. Use 'null' for defaults. Please refer to the ImportOptions constructor information on default settings.

restartImport

public com.ibm.mm.sdk.common.DKDDO[] restartImport(java.lang.String trackingFileName,
                                                   boolean skipIncomplete,
                                                   com.ibm.mm.sdk.server.DKDatastoreICM targetDS,
                                                   TExportPackageICM.ImportOptions importOptions)
                                            throws com.ibm.mm.sdk.common.DKException,
                                                   java.lang.Exception
 Restart a previous import operation that failed or did not complete.  The operation
 may restart where the previous operation left off or skip the failed / incomplete
 step.                                                                         
 
 The same Export Package must be loaded along with the Import Operations Tracking
 File (*.trk) that was generated from that import process, specified by the 
 TExportPackageICM.ImportOptions object's tracking file setting.  Please refer to
 its setTrackingFile() Javadoc for more information.                           

 The importItems() function will be re-issued in restart mode.  Please refer to the
 importItems() Javadoc for information on the import operation.                

 Failed or incomplete past import or restart operations may be restarted from where
 they left off or skip the failed/incomplete items.                            

 Any items marked as completed in each phase of that file will not be attempted to
 be imported.  By default all incomplete and items not started for each phase of
 the import process will be restarted in each respective phase.                 

 The skipIncomplete option value of 'true' will result in omission of all
 incomplete items which will enable those items to be skipped in that phase and all
 future phases in which that item was started by not completed.                
 
 FILE SYNTAX: The tracking file contains information on started, completed, failed,
              omitted, and incomplete import operations for each of the three passes
              of the import operation.

              The file is started with the Tracking File Identifier Tag,
              TExportPackageICM.T_ICM_EXPORT_PACKAGE_TRACKING_FILE_IDENTIFIER followed
              by " v".  The version is the version of the
              export package that wrote the file during a previous importItem() or
              restartImport() operation.  That version is compared against the current
              version of the tool, TExportPackageICM.T_ICM_EXPORT_PACKAGE_VERSION,
              and a warning may be thrown depending on the import options if they do
              not match.

              Next, in any order, regardless of duplicate entries, or split sections,
              pass tag identifiers indicate which of the three passes the following
              information contains.  Only the beginning tag is necessary, which directs
              the read operation to know which pass each line entry pertains to.
              For example, a file may contain tags in this order: pass1,pass3,pass2,
              pass2,pass1.  End tags are not necessary, but if specified the function
              will not accept any input before a new start tag is specified.  An
              exception will always be thrown if data is started before a begin tag
              is found.
              
                  Required Pass Tags:
                      TExportPackageICM.T_ICM_EXPORT_PACKAGE_TRACKING_PASS1_TAG_BEGIN
                      TExportPackageICM.T_ICM_EXPORT_PACKAGE_TRACKING_PASS2_TAG_BEGIN
                      TExportPackageICM.T_ICM_EXPORT_PACKAGE_TRACKING_PASS3_TAG_BEGIN
                  Optional Pass Tags:
                      TExportPackageICM.T_ICM_EXPORT_PACKAGE_TRACKING_PASS1_TAG_END
                      TExportPackageICM.T_ICM_EXPORT_PACKAGE_TRACKING_PASS2_TAG_END
                      TExportPackageICM.T_ICM_EXPORT_PACKAGE_TRACKING_PASS3_TAG_END

              Within each pass section, line entries of itemInfoPack information
              for items that were processed during each pass are indicated, starting
              with the operation performed.  Operation tags are case-insensitive.  

                  Operation Tag Length:
                       TExportPacageICM.T_ICM_EXPORT_PACKAGE_TRACKING_OPERATION_TAG_LEN
                  Operation Tags:
                       TExportPacageICM.T_ICM_EXPORT_PACKAGE_TRACKING_OPERATION_NONE
                       TExportPacageICM.T_ICM_EXPORT_PACKAGE_TRACKING_OPERATION_STARTING
                       TExportPacageICM.T_ICM_EXPORT_PACKAGE_TRACKING_OPERATION_COMPLETE
                       TExportPacageICM.T_ICM_EXPORT_PACKAGE_TRACKING_OPERATION_OMITTING

               Any Started tag not followed by a complete tag is considered an
               incomplete import operation.  Any omitted tag is considered an
               incomplete operation.  Any complete tag is the only tag representing
               a completed operation.

               Comments are any lines that begin with "//", '#', or start with the 
               NONE operation tag.
 


Parameters:
trackingFileName - - Import Operation Tracking File saved from a call to a previous importItems() or restartImport() call. The file is created according to the TExportPackageICM.ImportOptions object according to its tracking file setting.
skipIncomplete - - Skip any items that were started, but were not completed. This is best used to ignore / omit the last item that failed.
targetDS - - Target datastore to import items to.
importOptions - - (Optional) Import Options specified in a TExportPackageICM.ImportOptions object. Use 'null' for defaults. Please refer to the ImportOptions constructor information on default settings.
Returns:
Returns an array of the Root DKDDO objects for the imported items.

write

public void write(java.lang.String centralFileName,
                  TExportPackageICM.ExportOptions exportOptions)
           throws com.ibm.mm.sdk.common.DKException,
                  java.lang.Exception
Write Exported Package. Package will be written as a number of files, with the specified main export package the owns all other created files.

Parameters:
centralFileName - - Central Export Package file responsible for entire package state and all files needed.
exportOptions - - (Optional) Export Options specified in a TExportPackageICM.ExportOptions object. Use 'null' for defaults. Please refer to the ExportOptions constructor information on default settings.