Class TExportPackageICM.ExportOptions

java.lang.Object
  |
  +--TExportPackageICM.Options
        |
        +--TExportPackageICM.ExportOptions
Enclosing class:
TExportPackageICM

public static class TExportPackageICM.ExportOptions
extends TExportPackageICM.Options

This object specifies the matrix of export options. It may be handed off to the export methods and may be modified by the tool as needed. This object is responsible for the full state of export options, including the constants, setting them, checking them, and possibly prompting the user.


Constructor Summary
TExportPackageICM.ExportOptions()
           Create an ExportOptions object, initializing with defaults.
TExportPackageICM.ExportOptions(java.lang.String iniFileName)
          Create an ExportOptions object with the settings specified in the given configuration file.
 
Method Summary
 int getAnswer_folderContentPolicy(java.lang.String folderDesc, java.lang.String contentItemVersionList)
          Get an answer for the folder content export policy.
 boolean getAnswer_isSelectedItemPolicy_exportAll(java.lang.String versionList)
          Determines whether the selected item export policy is set to the export all version of items directly selected.
 boolean getAnswer_isSelectedItemPolicy_exportSelected(java.lang.String versionList)
          Determines whether the selected item export policy is set to the export only the latest version.
 boolean getAnswer_isSelectedItemPolicy(int policySetting, java.lang.String versionList)
          Determines whether the selected item export policy is set to the specified policy.
 int getAnswer_linkedItemsPolicy(java.lang.String mainItemDesc, java.lang.String otherItemVersionList, java.lang.String linkItemVersionList)
          Get an answer for the linked items export policy.
 int getAnswer_refAttrValuePolicy(java.lang.String mainCompDesc, java.lang.String refAttrName, java.lang.String valueItemVersionList)
          Get an answer for the reference attribute value export policy.
 int getFolderContentPolicy()
          Get the Policy on exporting versions for folder contents.
 int getLinkedItemsPolicy()
          Get the Policy on exporting versions for items reference in a link.
 int getRefAttrValuePolicy()
          Get the Policy on exporting versions for items reference by reference attributes.
 int getSelectedItemPolicy()
          Get the Policy on exporting versions of the items directly selected.
 boolean isFolderContentPolicy_promptAlways()
          Determines whether the folder content export policy is set to always prompt the user.
 boolean isLinkedItemsPolicy_promptAlways()
          Determines whether the linked itemsexport policy is set to always prompt the user.
 boolean isRefAttrValuePolicy_promptAlways()
          Determines whether the reference attribute value export policy is set to always prompt the user.
 void read(java.lang.String iniFileName)
          Read in settings in configuration file.
 void setFolderContentPolicy(int policySetting)
          Set Folder Content Export Policy.
 void setLinkedItemsPolicy(int policySetting)
          Set Linked Items Export Policy.
 void setRefAttrValuePolicy(int policySetting)
          Set RefAttr Value Export Policy.
 void setSelectedItemPolicy(int policySetting)
          Set Selected Item Export Policy.
 java.lang.String toString()
          Returns a string representation of this object.
 void write(java.lang.String iniFileName)
          Write current settings to configuration file.
 
Methods inherited from class TExportPackageICM.Options
getPrintDebugEnable, getPrintTraceEnable, setPrintDebugEnable, setPrintTraceEnable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TExportPackageICM.ExportOptions

public TExportPackageICM.ExportOptions()
 Create an ExportOptions object, initializing with defaults.  For traceEnable
 and debugEnable defaults, please refer to the javadoc for Options().

 Defaults:
       Selected Item Policy  = TExportPackageICM.OPTION_SELECTED_ITEM_EXPORT_ALL_VERSIONS 
       Folder Content Policy = TExportPackageICM.OPTION_FOLDER_CONTENT_EXPORT_ALL_VERSIONS
       Linked Items Policy   = TExportPackageICM.OPTION_LINKED_ITEMS_EXPORT_ALL_VERSIONS  
       RefAttr Value Policy  = TExportPackageICM.OPTION_REFATTR_VALUE_EXPORT_ALL_VERSIONS 
 

TExportPackageICM.ExportOptions

public TExportPackageICM.ExportOptions(java.lang.String iniFileName)
                                throws java.lang.Exception
Create an ExportOptions object with the settings specified in the given configuration file. For any settings not specified, defaults will be used. For information on configuration file format, please refer to the TExportPackageICM.ExportOptions.read() documention. For information on default settings, please refer to the primary constructor.

Parameters:
iniFileName - - Name of configuration file.
Method Detail

getFolderContentPolicy

public int getFolderContentPolicy()
Get the Policy on exporting versions for folder contents.

Returns:
Returns the current folder content version export policy. Options are listed in the set method's javadoc.

getLinkedItemsPolicy

public int getLinkedItemsPolicy()
Get the Policy on exporting versions for items reference in a link.

Returns:
Returns the current linked item version export policy. Options are listed in the set method's javadoc.

getRefAttrValuePolicy

public int getRefAttrValuePolicy()
Get the Policy on exporting versions for items reference by reference attributes.

Returns:
Returns the current reference attribute item version export policy. Options are listed in the set method's javadoc.

getSelectedItemPolicy

public int getSelectedItemPolicy()
Get the Policy on exporting versions of the items directly selected.

Returns:
Returns the current selected item version export policy. Options are listed in the set method's javadoc.

getAnswer_folderContentPolicy

public int getAnswer_folderContentPolicy(java.lang.String folderDesc,
                                         java.lang.String contentItemVersionList)
                                  throws java.io.IOException,
                                         java.lang.Exception
Get an answer for the folder content export policy. The user will be prompted if policy is set to prompt, otherwise it will return the normal policy.

Parameters:
folderDesc - - Description of the folder that contains the content.
contentItemVersionList - - Listing of versions found to display.

getAnswer_linkedItemsPolicy

public int getAnswer_linkedItemsPolicy(java.lang.String mainItemDesc,
                                       java.lang.String otherItemVersionList,
                                       java.lang.String linkItemVersionList)
                                throws java.io.IOException,
                                       java.lang.Exception
Get an answer for the linked items export policy. The user will be prompted if policy is set to prompt, otherwise it will return the normal policy.

Parameters:
mainItemDesc - - Description of the main item that holds this link.
otherItemVersionList - - Unselected Versions of Other item linked to, source if inbound, target if outbound.
linkItemVersionList - - Unselected Versions of Optional Description Item (Link Item).

getAnswer_refAttrValuePolicy

public int getAnswer_refAttrValuePolicy(java.lang.String mainCompDesc,
                                        java.lang.String refAttrName,
                                        java.lang.String valueItemVersionList)
                                 throws java.io.IOException,
                                        java.lang.Exception
Get an answer for the reference attribute value export policy. The user will be prompted if policy is set to prompt, otherwise it will return the normal policy.

Parameters:
mainCompDesc - - Description of the component containing the reference attribute.
refAttrName - - Reference Attribute name
valueItemVersionList - - Unselected Versions of the value item of the reference attribute.

getAnswer_isSelectedItemPolicy

public boolean getAnswer_isSelectedItemPolicy(int policySetting,
                                              java.lang.String versionList)
                                       throws java.io.IOException,
                                              java.lang.Exception
Determines whether the selected item export policy is set to the specified policy. The user will be prompted if policy is set to prompt.

Parameters:
policySetting - - Policy Setting to check for.
versionList - - Listing of versions found to display.

getAnswer_isSelectedItemPolicy_exportSelected

public boolean getAnswer_isSelectedItemPolicy_exportSelected(java.lang.String versionList)
                                                      throws java.io.IOException,
                                                             java.lang.Exception
Determines whether the selected item export policy is set to the export only the latest version. The user will be prompted if policy is set to prompt.

Parameters:
versionList - - Listing of versions found to display.
Returns:
Returns true if only the selected versions are to be exported

getAnswer_isSelectedItemPolicy_exportAll

public boolean getAnswer_isSelectedItemPolicy_exportAll(java.lang.String versionList)
                                                 throws java.io.IOException,
                                                        java.lang.Exception
Determines whether the selected item export policy is set to the export all version of items directly selected. The user will be prompted if policy is set to prompt.

Parameters:
versionList - - Listing of versions found to display.
Returns:
Returns true if all versions are to be exported

isFolderContentPolicy_promptAlways

public boolean isFolderContentPolicy_promptAlways()
                                           throws java.io.IOException,
                                                  java.lang.Exception
Determines whether the folder content export policy is set to always prompt the user.

Returns:
Returns true if the policy is set to prompt always, otherwise false.

isLinkedItemsPolicy_promptAlways

public boolean isLinkedItemsPolicy_promptAlways()
                                         throws java.io.IOException,
                                                java.lang.Exception
Determines whether the linked itemsexport policy is set to always prompt the user.

Returns:
Returns true if the policy is set to prompt always, otherwise false.

isRefAttrValuePolicy_promptAlways

public boolean isRefAttrValuePolicy_promptAlways()
                                          throws java.io.IOException,
                                                 java.lang.Exception
Determines whether the reference attribute value export policy is set to always prompt the user.

Returns:
Returns true if the policy is set to prompt always, otherwise false.

setFolderContentPolicy

public void setFolderContentPolicy(int policySetting)
                            throws java.lang.Exception
Set Folder Content Export Policy. If a folder is selected for export or is indirectly reference by any cascading chain of references, this policy determines which versions of the contents to export. Folders will always reference the latest version of an item, since folder content relationships are not versioned in an item. If only the latest version is exported, a version gap may be created since the versions in between may not exist on the target datastore. The version gap handling in the import options may offer an alternative too.

Parameters:
policySetting - - Policy options are:
  • TExportPackageICM.OPTION_FOLDER_CONTENT_EXPORT_LATEST_VERSION:
    When an items are selected for export and its references are being traversed to pull folder contents with it, if those items are versioned, this option will select only export the latest version. The user program must add any other items it desires explicitly.
  • TExportPackageICM.OPTION_FOLDER_CONTENT_EXPORT_ALL_VERSIONS:
    When folder contents are refernced directly or indirectly, all versions of each content are to be selected for export.
  • TExportPackageICM.OPTION_FOLDER_CONTENT_REMOVE_VALUE:
    Folder contents will be removed from the exported item. They will not exist on the target system.
  • TExportPackageICM.OPTION_FOLDER_CONTENT_PROMPT_IF_VERSIONS:
    The user will be prompted on the commandline if multiple versions are detected.
  • TExportPackageICM.OPTION_FOLDER_CONTENT_PROMPT_ALWAYS:
    The user will be always be prompted on the commandline if a folder content is found.

setLinkedItemsPolicy

public void setLinkedItemsPolicy(int policySetting)
                          throws java.lang.Exception
Set Linked Items Export Policy. If an item is selected for export or is indirectly reference by any cascading chain of references, and it contains links to other items, this policy determines which versions to export. Links do not reference a specific version, and therefore by default will point to the latest version. The previous versions may not exist in the target system and might not be selected by the user explicitly. The version gap handling in the import options may offer an alternative too.

Parameters:
policySetting - - Policy options are:
  • TExportPackageICM.OPTION_LINKED_ITEMS_EXPORT_LATEST_VERSION:
    When an items are selected for export and its references are being traversed to pull linked items with it, if those items are versioned, this option will select only export the latest version. The user program must add any other items it desires explicitly.
  • TExportPackageICM.OPTION_LINKED_ITEMS_EXPORT_ALL_VERSIONS:
    When linked items are refernced directly or indirectly, all versions of each item are to be selected for export.
  • TExportPackageICM.OPTION_LINKED_ITEMS_REMOVE_LINK:
    Links will be removed from the exported item. They will not exist on the target system.
  • TExportPackageICM.OPTION_LINKED_ITEMS_PROMPT_IF_VERSIONS:
    The user will be prompted on the commandline if multiple versions are detected.
  • TExportPackageICM.OPTION_LINKED_ITEMS_PROMPT_ALWAYS:
    The user will be always be prompted on the commandline if a link is found.

setRefAttrValuePolicy

public void setRefAttrValuePolicy(int policySetting)
                           throws java.lang.Exception
Set RefAttr Value Export Policy. If an item is selected for export or is indirectly reference by any cascading chain of references, and a reference attribute is found in its tree of components that references another item of a specific version, this policy determines which versions to export. Reference Attributes reference a specific version of an item. The previous versions may not exist in the target system and might not be selected by the user explicitly. The version gap handling in the import options may offer an alternative too.

Parameters:
policySetting - - Policy options are:
  • TExportPackageICM.OPTION_REFATTR_VALUE_EXPORT_REFERENCED_VERSION:
    When an items are selected for export and its references are being traversed to pull items referenced by reference attributes, if those items are versioned, this option will select only export only the version referenced. The user program must add any other items it desires explicitly.
  • TExportPackageICM.OPTION_REFATTR_VALUE_EXPORT_ALL_VERSIONS:
    When reference attr values are refernced directly or indirectly, all versions of each content are to be selected for export.
  • TExportPackageICM.OPTION_REFATTR_VALUE_REMOVE_VALUE:
    Referenence Attributes will be set to null, and will remain null in the target system.
  • TExportPackageICM.OPTION_REFATTR_VALUE_PROMPT_IF_VERSIONS:
    The user will be prompted on the commandline if multiple versions are detected.
  • TExportPackageICM.OPTION_REFATTR_VALUE_PROMPT_ALWAYS:
    The user will be always be prompted on the commandline if a reference attribute value is found.

setSelectedItemPolicy

public void setSelectedItemPolicy(int policySetting)
                           throws java.lang.Exception
Set Selected Item Export Policy. If an item is selected for export directly by the user or is a direct result of a query selected for export, This policy determines which versions to export. If not all versions are selected for export, those versions not selected may not exist in the target system, causing a gap to exist which is not allowed. on import. The version gap handling in the import options may offer an alternative too.

Parameters:
policySetting - - Policy options are:
  • TExportPackageICM.OPTION_SELECTED_ITEM_EXPORT_SELECTED_VERSION:
    Only the versions of the items directly selected will be exported. Indirectly referenced item versions are handled through separate policies.
  • TExportPackageICM.OPTION_SELECTED_ITEM_EXPORT_ALL_VERSIONS:
    Export all versions of any item directly selected.
  • TExportPackageICM.OPTION_SELECTED_ITEM_PROMPT_IF_VERSIONS:
    The user will be prompted on the commandline if multiple versions are detected.

read

public void read(java.lang.String iniFileName)
          throws java.lang.Exception
Read in settings in configuration file. File may be created by the write() function, modified externally, or created from stracth. Please refer to the the TExportPackageICM.Options.read() function for more information.

File Syntax
Please refer to the javadoc on the TExportPackageICM.Options.read() function for complete information.

Overrides:
read in class TExportPackageICM.Options
Parameters:
iniFileName - - Name of configuration file.

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class TExportPackageICM.Options
Returns:
Returns a string representation of this object.

write

public void write(java.lang.String iniFileName)
           throws java.lang.Exception
Write current settings to configuration file.

File Syntax
Please refer to the read() method.

Overrides:
write in class TExportPackageICM.Options
Parameters:
iniFileName - - Name of configuration file.