com.ptc.windchill.instassm
Class InstalledAssembly

java.lang.Object
  extended bycom.ptc.windchill.instassm.XmlFragment
      extended bycom.ptc.windchill.instassm.InstalledAssembly

public final class InstalledAssembly
extends XmlFragment

A class for reading the InstalledAssembly file for individual installed assemblies.

This class is meant for use on the system where the Windchill Platform or Solution is installed. It cannot be used from a client.

Supported API: false

Extendable: false


Nested Class Summary
 class InstalledAssembly.InstalledComponent
           
 
Field Summary
private  String baseInstallerSequence_
           
private  ReleaseId baseReleaseIdentifier_
           
private  String baseSupportDateCode_
           
private static String BREAK_AND_INDENT
           
private  String displayName_
           
private  Element element_
           
private static String[] EMPTY_STRING_ARRAY
           
private  ArrayList extensionNodes_
           
private  boolean initialized_
           
private  Map installedComponents_
           
private static String INSTALLER_ELEM_COMMENT
           
private  InstallerComponentMap installerComponentMap_
           
private  File installerComponentMapFile_
           
private  String installerSequence_
           
private  int instregVersion_
           
private  ArrayList intermediateInstallerSequencesList_
           
private  ArrayList intermediateReleaseIdentifiersList_
           
private  ArrayList intermediateSupportDateCodesList_
           
private  boolean isInstallAnywhereAssembly_
           
private  boolean isNotComplete_
           
private static int MAX_WRAPPED_MESSAGE_WIDTH
           
private  boolean mergeOutOfProcess_
           
private  int originalInstregVersion_
           
private  ReleaseId releaseIdentifier_
           
private  String supportDateCode_
           
private  String supportReleaseNumber_
           
private  String versionCode_
           
 
Constructor Summary
(package private) InstalledAssembly(Element element)
           
  InstalledAssembly(File file)
          Read the installed assembly (IA) file from the given file.
  InstalledAssembly(InputStream input_stream)
          Read the installed assembly (IA) file from the given file.
(package private) InstalledAssembly(ReleaseId release_id, String display_name, String support_date_code, String support_release_number, String installer_sequence_number, boolean is_complete, String version_code, ReleaseId base_release_id, String base_support_datecode, String base_installer_sequence, String[] intermediate_release_ids_list, String[] intermediate_support_datecodes_list, String[] intermediate_installer_sequences_list)
           
(package private) InstalledAssembly(ReleaseId release_id, String display_name, String support_date_code, String support_release_number, String installer_sequence_number, boolean is_complete, String version_code, ReleaseId base_release_id, String base_support_datecode, String base_installer_sequence, String[] intermediate_release_ids_list, String[] intermediate_support_datecodes_list, String[] intermediate_installer_sequences_list, File installer_comp_map_file)
           
(package private) InstalledAssembly(String release_id, String display_name, String support_date_code, String support_release_number, String installer_sequence_number, boolean is_complete, String version_code, ReleaseId base_release_id, String base_support_datecode, String base_installer_sequence, String[] intermediate_release_ids_list, String[] intermediate_support_datecodes_list, String[] intermediate_installer_sequences_list)
           
(package private) InstalledAssembly(String release_id, String display_name, String support_date_code, String support_release_number, String installer_sequence_number, boolean is_complete, String version_code, ReleaseId base_release_id, String base_support_datecode, String base_installer_sequence, String[] intermediate_release_ids_list, String[] intermediate_support_datecodes_list, String[] intermediate_installer_sequences_list, File installer_comp_map_file)
           
 
Method Summary
private  void checkBaseReleaseInformation()
           
(package private) static String checkGetOptarg(int c, String arg)
           
(package private) static String checkGetOptarg(int c, String arg, String not_string)
           
private  void checkIntermediateReleaseInformation()
           
static void convertLeadingLongDashesToRegularDashes(String[] args)
           
static void createInstalledAssemblyElement(String install_reg_dir_name, String release_id, String display_name, String support_date_code, String support_release_number, String installer_sequence_number, boolean is_complete, String version_code, String base_release_id_string, String base_support_date_code, String base_installer_sequence_number, String[] intermediate_release_ids_list, String[] intermediate_support_datecodes_list, String[] intermediate_installer_sequences_list)
          Create the InstalledAssembly element.
static void createInstalledAssemblyElement(String install_reg_dir_name, String release_id, String display_name, String support_date_code, String support_release_number, String installer_sequence_number, boolean is_complete, String version_code, String base_release_id_string, String base_support_date_code, String base_installer_sequence_number, String[] intermediate_release_ids_list, String[] intermediate_support_datecodes_list, String[] intermediate_installer_sequences_list, File installer_comp_map_file)
          Create the InstalledAssembly element.
static void createInstalledAssemblyElement(String install_reg_dir_name, String release_id, String display_name, String support_date_code, String support_release_number, String installer_sequence_number, boolean is_complete, String version_code, String base_release_id_string, String base_support_date_code, String base_installer_sequence_number, String intermediate_release_ids_list, String intermediate_support_datecodes_list, String intermediate_installer_sequences_list)
          Create the InstalledAssembly element.
(package private) static InstalledAssembly[] findInstalledAssemblies()
          Factory that locates all IA files in the $(wt.home)/{codebase|installer}/instreg dir, parses them, and, for any that are actually installed (have installed components) returns an array of InstalledAssembly objects wrapping each of their contents.
(package private) static InstalledAssembly[] findInstalledAssemblies(boolean must_actually_be_installed)
          Factory that locates all IA files in the $(wt.home)/{codebase|installer}/instreg dir, parses them, and, when required, for any that are actually installed (have installed components) returns an array of InstalledAssembly objects wrapping each of their contents.
 String getAssemblyId()
          The assembly identifier for the assembly.
 String getBaseInstallerSequence()
          Gets the base installer sequence this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
static String getBaseInstallerSequenceAttributeName()
          The base installer sequence attribute name for this assembly.
 ReleaseId getBaseReleaseIdentifier()
          The base ReleaseId this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
static String getBaseReleaseIdentifierAttributeName()
          The base ReleaseId attribute name for this assembly.
 String getBaseSupportDateCode()
          The base support datecode this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
static String getBaseSupportDateCodeAttributeName()
          The base support datecode attribute name for this assembly.
private  Element getComponentElement(String component_id)
           
 String[] getComponentIdsForFeatures(String[] feature_short_names)
           
 String getDisplayLabel()
          The display name associated with the versioned assembly.
 InstalledAssembly getInstalledAssembly(String aid)
          Get an InstalledAssembly based on its assembly id, possibly null if it is not installed.
 InstalledAssembly getInstalledAssembly(String aid, boolean must_actually_be_installed)
          Get an InstalledAssembly based on its assembly id, possibly null if it does not exist or has not actually been installed when requested to be.
 InstalledAssembly.InstalledComponent getInstalledComponent(String component_id)
          Gets an InstalledComponent, possibly null, for the specified id.
 String[] getInstalledComponentIds()
           
private  Element getInstallerElement()
           
 String getInstallerSequence()
          The installer sequence information associated with the versioned assembly.
 int getInstregVersion()
          The instreg version of this InstalledAssembly.
 String[] getIntermediateInstallerSequencesList()
          Get the intermediate installer sequences of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.
 int[] getIntermediateInstallerSequencesList(String[] string_list)
          Get the intermediate installer sequences of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.
 String getIntermediateInstallerSequencesListAsString()
          Gets a comma separated list the intermediate installer sequences of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.
static String getIntermediateInstallerSequencesListAttributeName()
          The intermediate installer sequences list attribute name for this assembly.
 ReleaseId[] getIntermediateReleaseIdentifiersList()
          Gets the intermediate ReleaseIds of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.
 String getIntermediateReleaseIdentifiersListAsString()
          Gets a comma separated list the intermediate ReleaseIds of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.
static String getIntermediateReleaseIdentifiersListAttributeName()
          The intermediate ReleaseIds list attribute name for this assembly.
 String[] getIntermediateSupportDateCodesList()
          Get the intermediate support datecodes of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.
 String getIntermediateSupportDateCodesListAsString()
          Gets a comma separated list the intermediate support datecodes of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.
static String getIntermediateSupportDateCodesListAttributeName()
          The intermediate support datecodes list attribute name for this assembly.
private static String[] getListEntries(String list, String attribute)
           
 int getOriginalInstregVersion()
          The original instreg version of this InstalledAssembly.
private  Element getProductElement()
           
 String getProductId()
           
 String getProductName()
           
 ReleaseId getReleaseId()
          The (formal) release identifier for the assembly.
protected  String getRootElementName()
           
protected  String getSaveToFileName()
           
 String getSupportDateCode()
          The date code associated with the versioned assembly.
 String getSupportReleaseNumber()
          The release number to show in the about pages.
 String getVersionCode()
          The version code associated with the versioned assembly.
protected  void initFrom(Element element)
           
protected  void initFrom(ReleaseId release_id, String display_name, String support_date_code, String support_release_number, String installer_sequence_number, boolean is_complete, String version_code, ReleaseId base_release_id, String base_support_datecode, String base_installer_sequence, String[] intermediate_release_ids_list, String[] intermediate_support_datecodes_list, String[] intermediate_installer_sequences_list, File installer_comp_map_file)
           
 boolean isComplete()
          Whether installation of this versioned assembly succeeded.
 boolean isInstalled()
          Whether this assembly actually is (has components) installed on the system.
 boolean isRegressed()
          Whether this assembly is regressed.
private  void logInstallerMessage(String msg)
           
static void main(String[] args)
          Command line interface to the InstalledAssembly.
(package private)  void mergeAssemblyWithInstalledAssembly()
           
static String sanitizeComponentShortName(String short_name)
          Convert a component short name to be a valid assembly id by converting any character not answering true to java.lang.Character.isLetterOrDigit(char) underscore and stripping all leading underscores from the resulting string.
 void saveToDir(File dir)
          Save the fragment as a file into a specified directory.
 void saveToRegistryDir()
          Save the InstalledAssembly file into the registry dir that IAConstants has been initialized with.
protected  void setAttributesOn(Element element)
           
private  void setBaseInstallerSequence(String base_installer_sequence)
          Sets the base installer sequence this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
private  void setBaseReleaseIdentifier(ReleaseId base_release_id)
          Sets the base ReleaseId this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
private  void setBaseReleaseIdentifier(String base_release_id_string)
          Sets the base ReleaseId this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
 void setBaseReleaseInformation(ReleaseId base_release_id, String base_support_datecode, String base_installer_sequence)
          Set the base ReleaseId, support datecode and installer sequence this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
 void setBaseReleaseInformation(String base_release_id, String base_support_datecode, String base_installer_sequence)
          Set the base ReleaseId, support datecode, and installer sequence this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
private  void setBaseSupportDateCode(String base_support_datecode)
          Sets the base support datecode this version of this assembly was compared against, if any, for creating MOR Content for this assembly.
 void setComplete(boolean is_complete)
          Change whether installation of this versioned assembly succeeded this will only change the state in-memory.
 void setComponentIsInstalled(String component_id, boolean is_installed)
          Records whether a component is installed or not, based on the is_installed mode passed in.
 void setDisplayLabel(String new_display_name)
          Set the display name associated with the versioned assembly.
 void setInstallerSequence(String new_installer_sequence)
          Changes the installer sequence information for the IA.
private  void setInstregVersion(Element element)
           
private  void setInstregVersion(int instreg_version)
           
private  void setInstregVersion(String instreg_version)
           
private  void setIntermediateInstallerSequencesList(String[] inter_installer_sequences_list)
          Sets the intermediate installer sequences of this assembly since the FCS or last recut build, if any, for creating MOR Content for this assembly.
private  void setIntermediateReleaseIdentifiersList(ReleaseId[] intermediate_release_ids_list)
          Sets the intermediate ReleaseId versions of intermediate releases of this assembly, for creating or installing MOR Content for this assembly.
private  void setIntermediateReleaseIdentifiersList(String[] intermediate_release_ids_list)
          Sets the intermediate ReleaseId versions of intermediate releases of this assembly, for creating or installing MOR Content for this assembly.
 void setIntermediateReleaseInformation(String[] intermediate_release_ids_list, String[] intermediate_support_datecodes_list, String[] intermediate_installer_sequences_list)
          Sets the release identifiers, support datecodes, and installer sequences of intermediate release versions of this assembly, if any, that were created as FCS releases or MOR Content for this assembly.
 void setIntermediateReleaseInformation(String intermediate_release_ids_list, String intermediate_support_datecodes_list, String intermediate_installer_sequences_list)
          Sets the release identifiers, support datecodes, and installer sequences of intermediate release versions of this assembly, if any, that were created as FCS releases or MOR Content for this assembly.
private  void setIntermediateSupportDateCodesList(String[] inter_support_data_codes_list)
          Sets the intermediate support datecodes of this assembly since the FCS or last recut build, if any, for creating MOR Content for this assembly.
 void setSupportDateCode(String new_date_code)
          Set the date code associated with the versioned assembly.
 void setSupportReleaseNumber(String new_release_number)
          Set the release number associated with the versioned assembly.
 void setVersionCode(String new_version_code)
          Set the version code associated with the versioned assembly.
private static void showHelp()
           
private static ArrayList split(String message)
           
 String toString()
           
 String toString(String sep)
           
private  void updateAssembly()
           
 void updateReleaseIdVersion(String new_version)
          Change the version of installed assembly.
private static String wrap(String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

originalInstregVersion_

private int originalInstregVersion_

instregVersion_

private int instregVersion_

initialized_

private boolean initialized_

releaseIdentifier_

private ReleaseId releaseIdentifier_

displayName_

private String displayName_

versionCode_

private String versionCode_

supportDateCode_

private String supportDateCode_

supportReleaseNumber_

private String supportReleaseNumber_

installerSequence_

private String installerSequence_

isNotComplete_

private boolean isNotComplete_

isInstallAnywhereAssembly_

private boolean isInstallAnywhereAssembly_

baseReleaseIdentifier_

private ReleaseId baseReleaseIdentifier_

baseSupportDateCode_

private String baseSupportDateCode_

baseInstallerSequence_

private String baseInstallerSequence_

intermediateReleaseIdentifiersList_

private ArrayList intermediateReleaseIdentifiersList_

intermediateSupportDateCodesList_

private ArrayList intermediateSupportDateCodesList_

intermediateInstallerSequencesList_

private ArrayList intermediateInstallerSequencesList_

installedComponents_

private Map installedComponents_

extensionNodes_

private ArrayList extensionNodes_

element_

private Element element_

mergeOutOfProcess_

private boolean mergeOutOfProcess_

installerComponentMapFile_

private File installerComponentMapFile_

installerComponentMap_

private InstallerComponentMap installerComponentMap_

INSTALLER_ELEM_COMMENT

private static final String INSTALLER_ELEM_COMMENT
See Also:
Constant Field Values

EMPTY_STRING_ARRAY

private static final String[] EMPTY_STRING_ARRAY

BREAK_AND_INDENT

private static final String BREAK_AND_INDENT

MAX_WRAPPED_MESSAGE_WIDTH

private static final int MAX_WRAPPED_MESSAGE_WIDTH
See Also:
Constant Field Values
Constructor Detail

InstalledAssembly

public InstalledAssembly(File file)
                  throws IAException
Read the installed assembly (IA) file from the given file.

Parameters:
file -
Throws:
IAException - if the file is not found, if the contents of the file are malformed, or if the rel id in the file is inconsistent with the name fo the file

InstalledAssembly

public InstalledAssembly(InputStream input_stream)
                  throws IAException
Read the installed assembly (IA) file from the given file.

Parameters:
input_stream - InputStream containing just the .ia content. The stream will not be closed when reading is complete.
Throws:
IAException - if the file is not found, if the contents of the file are malformed, or if the rel id in the file is inconsistent with the name fo the file

InstalledAssembly

InstalledAssembly(Element element)
            throws IAException

InstalledAssembly

InstalledAssembly(ReleaseId release_id,
                  String display_name,
                  String support_date_code,
                  String support_release_number,
                  String installer_sequence_number,
                  boolean is_complete,
                  String version_code,
                  ReleaseId base_release_id,
                  String base_support_datecode,
                  String base_installer_sequence,
                  String[] intermediate_release_ids_list,
                  String[] intermediate_support_datecodes_list,
                  String[] intermediate_installer_sequences_list)
            throws IAException

InstalledAssembly

InstalledAssembly(ReleaseId release_id,
                  String display_name,
                  String support_date_code,
                  String support_release_number,
                  String installer_sequence_number,
                  boolean is_complete,
                  String version_code,
                  ReleaseId base_release_id,
                  String base_support_datecode,
                  String base_installer_sequence,
                  String[] intermediate_release_ids_list,
                  String[] intermediate_support_datecodes_list,
                  String[] intermediate_installer_sequences_list,
                  File installer_comp_map_file)
            throws IAException

InstalledAssembly

InstalledAssembly(String release_id,
                  String display_name,
                  String support_date_code,
                  String support_release_number,
                  String installer_sequence_number,
                  boolean is_complete,
                  String version_code,
                  ReleaseId base_release_id,
                  String base_support_datecode,
                  String base_installer_sequence,
                  String[] intermediate_release_ids_list,
                  String[] intermediate_support_datecodes_list,
                  String[] intermediate_installer_sequences_list)
            throws IAException

InstalledAssembly

InstalledAssembly(String release_id,
                  String display_name,
                  String support_date_code,
                  String support_release_number,
                  String installer_sequence_number,
                  boolean is_complete,
                  String version_code,
                  ReleaseId base_release_id,
                  String base_support_datecode,
                  String base_installer_sequence,
                  String[] intermediate_release_ids_list,
                  String[] intermediate_support_datecodes_list,
                  String[] intermediate_installer_sequences_list,
                  File installer_comp_map_file)
            throws IAException
Method Detail

initFrom

protected void initFrom(ReleaseId release_id,
                        String display_name,
                        String support_date_code,
                        String support_release_number,
                        String installer_sequence_number,
                        boolean is_complete,
                        String version_code,
                        ReleaseId base_release_id,
                        String base_support_datecode,
                        String base_installer_sequence,
                        String[] intermediate_release_ids_list,
                        String[] intermediate_support_datecodes_list,
                        String[] intermediate_installer_sequences_list,
                        File installer_comp_map_file)
                 throws IAException
Throws:
IAException

initFrom

protected void initFrom(Element element)
                 throws IAException
Specified by:
initFrom in class XmlFragment
Throws:
IAException

setAttributesOn

protected void setAttributesOn(Element element)
                        throws IAException
Specified by:
setAttributesOn in class XmlFragment
Throws:
IAException

updateAssembly

private void updateAssembly()
                     throws IAException
Throws:
IAException

getReleaseId

public ReleaseId getReleaseId()
The (formal) release identifier for the assembly.

Supported API: false

Extendable: false

Returns:
a non-null release identifier

getAssemblyId

public String getAssemblyId()
The assembly identifier for the assembly.

Supported API: false

Extendable: false

Returns:
a non-null assembly identifier

updateReleaseIdVersion

public void updateReleaseIdVersion(String new_version)
                            throws IAException
Change the version of installed assembly. The assembly id of the specified new_version will be ignored and replaced with the assembly if of this instance.

Throws:
IAException

getDisplayLabel

public String getDisplayLabel()
The display name associated with the versioned assembly.

For 7.0 this was the displayLabel attribute. It was renamed the displayName attribute at 8.0. This is to prevent 7.0 installers from overwriting and corrupting a newer install registry.

The old the displayLabel attribute attribute is still recognized for backwards compatiblity when looking at 7.0 install registries.

Note that the content also changed slightly, dropping version information.

Supported API: false

Extendable: false

Returns:
a non-null, possibly empty string

setDisplayLabel

public void setDisplayLabel(String new_display_name)
                     throws IAException
Set the display name associated with the versioned assembly.

For 7.0 this was the displayLabel attribute. It was renamed the displayName attribute at 8.0. This is to prevent 7.0 installers from overwriting and corrupting a newer install registry.

Note that the content changed slightly also, dropping version information.

Supported API: false

Extendable: false

Parameters:
new_display_name - possibly empty, non null, string
Throws:
IAException

getVersionCode

public String getVersionCode()
The version code associated with the versioned assembly.

Supported API: false

Extendable: false

Returns:
a non-null non-empty string

setVersionCode

public void setVersionCode(String new_version_code)
                    throws IAException
Set the version code associated with the versioned assembly.

Supported API: false

Extendable: false

Parameters:
new_version_code - possibly empty, possibly null, string
Throws:
IAException

getSupportReleaseNumber

public String getSupportReleaseNumber()
The release number to show in the about pages.

Supported API: false

Extendable: false

Returns:
a non-null string containing the release number

setSupportReleaseNumber

public void setSupportReleaseNumber(String new_release_number)
                             throws IAException
Set the release number associated with the versioned assembly.

Supported API: false

Extendable: false

Parameters:
new_release_number - possibly empty, non null, string
Throws:
IAException

getSupportDateCode

public String getSupportDateCode()
The date code associated with the versioned assembly.

Supported API: false

Extendable: false

Returns:
a non-null, possibly empty string

setSupportDateCode

public void setSupportDateCode(String new_date_code)
                        throws IAException
Set the date code associated with the versioned assembly.

Supported API: false

Extendable: false

Parameters:
new_date_code - possibly empty, non null, string
Throws:
IAException

getInstallerSequence

public String getInstallerSequence()
The installer sequence information associated with the versioned assembly.

Supported API: false

Extendable: false

Returns:
a non-null, possibly empty string

setInstallerSequence

public void setInstallerSequence(String new_installer_sequence)
Changes the installer sequence information for the IA.

Supported API: false

Extendable: false


setComplete

public void setComplete(boolean is_complete)
Change whether installation of this versioned assembly succeeded this will only change the state in-memory. The object must be written to file and integrated with the installation registry for this change to be official.

Supported API: false

Extendable: false


isComplete

public boolean isComplete()
Whether installation of this versioned assembly succeeded.

Supported API: false

Extendable: false


isInstalled

public boolean isInstalled()
Whether this assembly actually is (has components) installed on the system. This method also returns true when the file does not contain an "Installer" element (for backwards compatiblity with non InstallAnywhere installed assemblies).

Supported API: false

Extendable: false


isRegressed

public boolean isRegressed()
Whether this assembly is regressed. That is, this assembly has at one time been at a higher release level than one or more of its containing installed components. This can occur, for example, when the FCS installer is reapplied to a loadpoint to (re)install some component after the assembly has been upgraded to a higher MOR level.

Supported API: false

Extendable: false


setBaseReleaseInformation

public void setBaseReleaseInformation(ReleaseId base_release_id,
                                      String base_support_datecode,
                                      String base_installer_sequence)
                               throws IAException
Set the base ReleaseId, support datecode and installer sequence this version of this assembly was compared against, if any, for creating MOR Content for this assembly. They all may be null, but not just one null.

Parameters:
base_release_id - a ReleaseId containing the base release identifier
base_support_datecode - a String containing the base support datecode
base_installer_sequence - a String containing the base installer sequence

Supported API: false

Extendable: false
Throws:
IAException

setBaseReleaseInformation

public void setBaseReleaseInformation(String base_release_id,
                                      String base_support_datecode,
                                      String base_installer_sequence)
                               throws IAException
Set the base ReleaseId, support datecode, and installer sequence this version of this assembly was compared against, if any, for creating MOR Content for this assembly. They all may be null, but not just one null.

Parameters:
base_release_id - a String containing the base release identifier
base_support_datecode - a String containing the base support datecode
base_installer_sequence - a String containing the base installer sequence

Supported API: false

Extendable: false
Throws:
IAException

setInstregVersion

private void setInstregVersion(Element element)
                        throws IAException
Throws:
IAException

setInstregVersion

private void setInstregVersion(String instreg_version)
                        throws IAException
Throws:
IAException

setInstregVersion

private void setInstregVersion(int instreg_version)
                        throws IAException
Throws:
IAException

getInstregVersion

public int getInstregVersion()
                      throws IAException
The instreg version of this InstalledAssembly.

Supported API: false

Extendable: false

Returns:
integer
Throws:
IAException

getOriginalInstregVersion

public int getOriginalInstregVersion()
                              throws IAException
The original instreg version of this InstalledAssembly.

Supported API: false

Extendable: false

Returns:
integer
Throws:
IAException

checkBaseReleaseInformation

private void checkBaseReleaseInformation()
                                  throws IAException
Throws:
IAException

getBaseReleaseIdentifier

public ReleaseId getBaseReleaseIdentifier()
The base ReleaseId this version of this assembly was compared against, if any, for creating MOR Content for this assembly.

Supported API: false

Extendable: false

Returns:
a ReleaseId (possibly null when undefined)

getBaseReleaseIdentifierAttributeName

public static final String getBaseReleaseIdentifierAttributeName()
The base ReleaseId attribute name for this assembly.

Supported API: false

Extendable: false

Returns:
a String containing the base ReleaseId attribute name for this assembly.

setBaseReleaseIdentifier

private void setBaseReleaseIdentifier(ReleaseId base_release_id)
                               throws IAException
Sets the base ReleaseId this version of this assembly was compared against, if any, for creating MOR Content for this assembly. May be null. The ReleaseIds must be from the same assemblies. The base ReleaseId must be less than the current assembly.

Supported API: false

Extendable: false

Throws:
IAException

setBaseReleaseIdentifier

private void setBaseReleaseIdentifier(String base_release_id_string)
                               throws IAException
Sets the base ReleaseId this version of this assembly was compared against, if any, for creating MOR Content for this assembly. May be null or empty (which equates to null). The ReleaseIds must be from the same assemblies. The base ReleaseId must be less than the current assembly.

Supported API: false

Extendable: false

Throws:
IAException

getBaseSupportDateCode

public String getBaseSupportDateCode()
The base support datecode this version of this assembly was compared against, if any, for creating MOR Content for this assembly.

Supported API: false

Extendable: false

Returns:
a String with the base support datecode (possibly null when undefined)

getBaseSupportDateCodeAttributeName

public static final String getBaseSupportDateCodeAttributeName()
The base support datecode attribute name for this assembly.

Supported API: false

Extendable: false

Returns:
a String containing the base support datecode attribute name for this assembly.

setBaseSupportDateCode

private void setBaseSupportDateCode(String base_support_datecode)
                             throws IAException
Sets the base support datecode this version of this assembly was compared against, if any, for creating MOR Content for this assembly. May be null or empty. The base support datecode must be less than the current assemblies support datecode.

Supported API: false

Extendable: false

Throws:
IAException

getBaseInstallerSequence

public String getBaseInstallerSequence()
Gets the base installer sequence this version of this assembly was compared against, if any, for creating MOR Content for this assembly.

Supported API: false

Extendable: false

Returns:
a String with the base installer sequence (possibly null when undefined)

getBaseInstallerSequenceAttributeName

public static final String getBaseInstallerSequenceAttributeName()
The base installer sequence attribute name for this assembly.

Supported API: false

Extendable: false

Returns:
a String containing the base installer sequence attribute name for this assembly.

setBaseInstallerSequence

private void setBaseInstallerSequence(String base_installer_sequence)
Sets the base installer sequence this version of this assembly was compared against, if any, for creating MOR Content for this assembly. May be null or empty.

Supported API: false

Extendable: false


setIntermediateReleaseInformation

public void setIntermediateReleaseInformation(String[] intermediate_release_ids_list,
                                              String[] intermediate_support_datecodes_list,
                                              String[] intermediate_installer_sequences_list)
                                       throws IAException
Sets the release identifiers, support datecodes, and installer sequences of intermediate release versions of this assembly, if any, that were created as FCS releases or MOR Content for this assembly. All may be null, or none null. The ReleaseIds must be from the same assemblies. The intermediate release identifiers must be greater than the base release identifier and less than the version for the current assembly. Likewise for the support datecodes. The release identifiers, support datecodes, and installer sequences must be in the same order, and there must be the same number of them. None of the individual entries in the list may be empty.

Parameters:
intermediate_release_ids_list - a String array containing intermediate release identifiers
intermediate_support_datecodes_list - a String array containing intermediate support datecodes
intermediate_installer_sequences_list - a String array containing intermediate installer sequences

Supported API: false

Extendable: false
Throws:
IAException

setIntermediateReleaseInformation

public void setIntermediateReleaseInformation(String intermediate_release_ids_list,
                                              String intermediate_support_datecodes_list,
                                              String intermediate_installer_sequences_list)
                                       throws IAException
Sets the release identifiers, support datecodes, and installer sequences of intermediate release versions of this assembly, if any, that were created as FCS releases or MOR Content for this assembly. All may be null, or none null. The ReleaseIds must be from the same assemblies. The intermediate release identifiers must be greater than the base release identifier and less than the version for the current assembly. Likewise for the support datecodes. The release identifiers, support datecodes, and installer sequences must be in the same order, and there must be the same number of them. None of the individual entries in the list may be empty.

Parameters:
intermediate_release_ids_list - a String containing a comma separated list of intermediate release identifiers
intermediate_support_datecodes_list - a String containing a comma separated list of intermediate support datecodes
intermediate_installer_sequences_list - a String containing a comma separated list of intermediate installer sequences

Supported API: false

Extendable: false
Throws:
IAException

getListEntries

private static String[] getListEntries(String list,
                                       String attribute)
                                throws IAException
Throws:
IAException

checkIntermediateReleaseInformation

private void checkIntermediateReleaseInformation()
                                          throws IAException
Throws:
IAException

getIntermediateReleaseIdentifiersList

public ReleaseId[] getIntermediateReleaseIdentifiersList()
Gets the intermediate ReleaseIds of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.

Supported API: false

Extendable: false

Returns:
a ReleaseId array (possibly null when undefined)

getIntermediateReleaseIdentifiersListAttributeName

public static final String getIntermediateReleaseIdentifiersListAttributeName()
The intermediate ReleaseIds list attribute name for this assembly.

Supported API: false

Extendable: false

Returns:
a String containing the intermediate ReleaseIds list attribute name for this assembly.

getIntermediateReleaseIdentifiersListAsString

public String getIntermediateReleaseIdentifiersListAsString()
Gets a comma separated list the intermediate ReleaseIds of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly.

Supported API: false

Extendable: false

Returns:
a single String of comma separated ReleaseIds (possibly null when undefined)

setIntermediateReleaseIdentifiersList

private void setIntermediateReleaseIdentifiersList(ReleaseId[] intermediate_release_ids_list)
                                            throws IAException
Sets the intermediate ReleaseId versions of intermediate releases of this assembly, for creating or installing MOR Content for this assembly. May be null. The ReleaseIds must be from the same assemblies. All ReleaseId versions must be greater than the base ReleaseId and less than the current assembly.

Supported API: false

Extendable: false

Throws:
IAException

setIntermediateReleaseIdentifiersList

private void setIntermediateReleaseIdentifiersList(String[] intermediate_release_ids_list)
                                            throws IAException
Sets the intermediate ReleaseId versions of intermediate releases of this assembly, for creating or installing MOR Content for this assembly. May be null. The ReleaseIds must be from the same assemblies. All ReleaseId versions must be greater than the base ReleaseId and less than the current assembly.

Supported API: false

Extendable: false

Throws:
IAException

getIntermediateSupportDateCodesList

public String[] getIntermediateSupportDateCodesList()
Get the intermediate support datecodes of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly. May be null if undefined.

Supported API: false

Extendable: false

Returns:
a String array of support datecodes (possibly null when undefined)

getIntermediateSupportDateCodesListAttributeName

public static final String getIntermediateSupportDateCodesListAttributeName()
The intermediate support datecodes list attribute name for this assembly.

Supported API: false

Extendable: false

Returns:
a String containing the intermediate support datecodes list attribute name for this assembly.

getIntermediateSupportDateCodesListAsString

public String getIntermediateSupportDateCodesListAsString()
Gets a comma separated list the intermediate support datecodes of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly. May be null if undefined.

Supported API: false

Extendable: false

Returns:
a single String of comma separated support datecodes (possibly null when undefined)

setIntermediateSupportDateCodesList

private void setIntermediateSupportDateCodesList(String[] inter_support_data_codes_list)
                                          throws IAException
Sets the intermediate support datecodes of this assembly since the FCS or last recut build, if any, for creating MOR Content for this assembly. May be null. The intermediate support datecodes must be greater than the base support datecode and less than the current Support Datacode.

Supported API: false

Extendable: false

Throws:
IAException

getIntermediateInstallerSequencesList

public String[] getIntermediateInstallerSequencesList()
Get the intermediate installer sequences of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly. May be null if undefined.

Supported API: false

Extendable: false

Returns:
a String array of installer sequences (possibly null when undefined)

getIntermediateInstallerSequencesListAttributeName

public static final String getIntermediateInstallerSequencesListAttributeName()
The intermediate installer sequences list attribute name for this assembly.

Supported API: false

Extendable: false

Returns:
a String containing the intermediate installer sequences list attribute name for this assembly.

getIntermediateInstallerSequencesList

public int[] getIntermediateInstallerSequencesList(String[] string_list)
                                            throws IAException
Get the intermediate installer sequences of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly. May be null if undefined.

Supported API: false

Extendable: false

Returns:
an int array of installer sequences (possibly null when undefined)
Throws:
IAException

getIntermediateInstallerSequencesListAsString

public String getIntermediateInstallerSequencesListAsString()
Gets a comma separated list the intermediate installer sequences of this assembly since the FCS or last recut build, if any, for comparing MOR Content for this assembly. May be null if undefined.

Supported API: false

Extendable: false

Returns:
a single String of comma separated installer sequences (possibly null when undefined)

setIntermediateInstallerSequencesList

private void setIntermediateInstallerSequencesList(String[] inter_installer_sequences_list)
                                            throws IAException
Sets the intermediate installer sequences of this assembly since the FCS or last recut build, if any, for creating MOR Content for this assembly. May be null.

Supported API: false

Extendable: false

Throws:
IAException

findInstalledAssemblies

static InstalledAssembly[] findInstalledAssemblies()
                                            throws IAException
Factory that locates all IA files in the $(wt.home)/{codebase|installer}/instreg dir, parses them, and, for any that are actually installed (have installed components) returns an array of InstalledAssembly objects wrapping each of their contents.

Supported API: false

Extendable: false

Returns:
a non-null, possibly empty array of InstalledAssembly
Throws:
IAException

findInstalledAssemblies

static InstalledAssembly[] findInstalledAssemblies(boolean must_actually_be_installed)
                                            throws IAException
Factory that locates all IA files in the $(wt.home)/{codebase|installer}/instreg dir, parses them, and, when required, for any that are actually installed (have installed components) returns an array of InstalledAssembly objects wrapping each of their contents.

Supported API: false

Extendable: false

Parameters:
must_actually_be_installed - true means the product associated with an assembly must have actually been installed (has installed components)
Returns:
a non-null, possibly empty array of InstalledAssembly
Throws:
IAException

getInstalledAssembly

public InstalledAssembly getInstalledAssembly(String aid)
                                       throws IAException
Get an InstalledAssembly based on its assembly id, possibly null if it is not installed.

Throws:
IAException

getInstalledAssembly

public InstalledAssembly getInstalledAssembly(String aid,
                                              boolean must_actually_be_installed)
                                       throws IAException
Get an InstalledAssembly based on its assembly id, possibly null if it does not exist or has not actually been installed when requested to be.

Parameters:
aid - Assembly Id of the assembly being sought.
must_actually_be_installed - true means the product associated with this assembly must have actually been installed (has installed components)
Returns:
An InstalledAssembly when found, null if not found or when must_actually_be_installed is true and isInstalled() is not true.
Throws:
IAException

saveToRegistryDir

public void saveToRegistryDir()
                       throws IAException
Save the InstalledAssembly file into the registry dir that IAConstants has been initialized with. This action merges this InstalledAssembly with the like assembly if it is already found on the system, but only when the current installer's install registry management code is up-to-date.

Overrides:
saveToRegistryDir in class XmlFragment
Throws:
IAException
See Also:
IAConstants

mergeAssemblyWithInstalledAssembly

void mergeAssemblyWithInstalledAssembly()
                                  throws IAException
Throws:
IAException

getSaveToFileName

protected String getSaveToFileName()
Specified by:
getSaveToFileName in class XmlFragment

getRootElementName

protected String getRootElementName()
Specified by:
getRootElementName in class XmlFragment

getInstalledComponentIds

public String[] getInstalledComponentIds()
Returns:
null if the information necessary for reporting this is not known. Otherwise, a non-null but possibly empty array of strings will be returned

setComponentIsInstalled

public void setComponentIsInstalled(String component_id,
                                    boolean is_installed)
                             throws IAException
Records whether a component is installed or not, based on the is_installed mode passed in.

Throws:
IAException

getInstallerElement

private Element getInstallerElement()
Returns:
null if there is no installer structure information

getComponentIdsForFeatures

public String[] getComponentIdsForFeatures(String[] feature_short_names)
Returns:
null if the information necessary for reporting this is not known. Otherwise, a non-null but possibly empty array of strings will be returned

getInstalledComponent

public InstalledAssembly.InstalledComponent getInstalledComponent(String component_id)
Gets an InstalledComponent, possibly null, for the specified id.


sanitizeComponentShortName

public static String sanitizeComponentShortName(String short_name)
Convert a component short name to be a valid assembly id by converting any character not answering true to java.lang.Character.isLetterOrDigit(char) underscore and stripping all leading underscores from the resulting string. 'ALWAYS INSTALL' will become 'ALWAYS_INSTALL'


getComponentElement

private Element getComponentElement(String component_id)

getProductId

public String getProductId()

getProductName

public String getProductName()

getProductElement

private Element getProductElement()

logInstallerMessage

private void logInstallerMessage(String msg)

toString

public String toString()

toString

public String toString(String sep)

main

public static void main(String[] args)
Command line interface to the InstalledAssembly.

For usage information, execute:

  java -cp ... com.ptc.windchill.instassm.InstalledAssembly -h
at the command prompt.

This command only creates the InstalledAssembly element, not a complete ia file. This command's main purpose is to create a skeleton ia file to include in the MORContent component directories for the Windchill Maintenance Pack (WMP) installer to use.


checkGetOptarg

static String checkGetOptarg(int c,
                             String arg)

checkGetOptarg

static String checkGetOptarg(int c,
                             String arg,
                             String not_string)

createInstalledAssemblyElement

public static void createInstalledAssemblyElement(String install_reg_dir_name,
                                                  String release_id,
                                                  String display_name,
                                                  String support_date_code,
                                                  String support_release_number,
                                                  String installer_sequence_number,
                                                  boolean is_complete,
                                                  String version_code,
                                                  String base_release_id_string,
                                                  String base_support_date_code,
                                                  String base_installer_sequence_number,
                                                  String intermediate_release_ids_list,
                                                  String intermediate_support_datecodes_list,
                                                  String intermediate_installer_sequences_list)
                                           throws IAException
Create the InstalledAssembly element.

This method only creates the InstalledAssembly element, not a complete ia file. This command's main purpose is to create a skeleton ia file to include in the MORContent component directories for the Windchill Maintenance Pack (WMP) installer to use.

Throws:
IAException

createInstalledAssemblyElement

public static void createInstalledAssemblyElement(String install_reg_dir_name,
                                                  String release_id,
                                                  String display_name,
                                                  String support_date_code,
                                                  String support_release_number,
                                                  String installer_sequence_number,
                                                  boolean is_complete,
                                                  String version_code,
                                                  String base_release_id_string,
                                                  String base_support_date_code,
                                                  String base_installer_sequence_number,
                                                  String[] intermediate_release_ids_list,
                                                  String[] intermediate_support_datecodes_list,
                                                  String[] intermediate_installer_sequences_list)
                                           throws IAException
Create the InstalledAssembly element.

This method only creates the InstalledAssembly element, not a complete ia file. This command's main purpose is to create a skeleton ia file to include in the MORContent component directories for the Windchill Maintenance Pack (WMP) installer to use.

Throws:
IAException

createInstalledAssemblyElement

public static void createInstalledAssemblyElement(String install_reg_dir_name,
                                                  String release_id,
                                                  String display_name,
                                                  String support_date_code,
                                                  String support_release_number,
                                                  String installer_sequence_number,
                                                  boolean is_complete,
                                                  String version_code,
                                                  String base_release_id_string,
                                                  String base_support_date_code,
                                                  String base_installer_sequence_number,
                                                  String[] intermediate_release_ids_list,
                                                  String[] intermediate_support_datecodes_list,
                                                  String[] intermediate_installer_sequences_list,
                                                  File installer_comp_map_file)
                                           throws IAException
Create the InstalledAssembly element.

This method only creates the InstalledAssembly element, not a complete ia file. This command's main purpose is to create a skeleton ia file to include in the MORContent component directories for the Windchill Maintenance Pack (WMP) installer to use.

Throws:
IAException

showHelp

private static void showHelp()

wrap

private static String wrap(String message)

split

private static ArrayList split(String message)

convertLeadingLongDashesToRegularDashes

public static void convertLeadingLongDashesToRegularDashes(String[] args)

saveToDir

public void saveToDir(File dir)
               throws IAException
Save the fragment as a file into a specified directory.

Throws:
IAException