com.ptc.windchill.instassm
Class InstallerComponentMap

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

public class InstallerComponentMap
extends XmlFragment

An internal-use-only class that provides simple Java APIs for manipulating the Installer component map.

Supported API: false

Extendable: false


Field Summary
private  Document doc_
           
private  ArrayList extensionNodes_
           
private  Element root_
           
private static String ROOT_COMMENT
           
private static String ROOT_ELEMENT
           
private static String ROOT_VERSION
           
private  String saveFileName_
           
 
Constructor Summary
(package private) InstallerComponentMap(Element element)
           
  InstallerComponentMap(File file)
          Read an Installer component map from the given file.
  InstallerComponentMap(InputStream input_stream)
          Read an Installer component map from the given file.
 
Method Summary
private  void analyzeDocument(Element element)
          Scan the DOM document for Installer component map information.
(package private) static String checkGetOptarg(int c, String arg)
           
(package private) static String checkGetOptarg(int c, String arg, String not_string)
           
(package private)  ArrayList debugGetExtensionNodes()
           
 Element getRootElement()
          Get the Installer component map root element.
protected  String getRootElementName()
           
protected  String getSaveToFileName()
           
protected  void initFrom(Element element)
           
static void main(String[] args)
          Command line interface to the InstallerComponentMap.
 void saveToDir(File dir)
          Save the fragment as a file into a specified directory.
 void saveToRegistryDir()
          Save the fragment as a file into the registry dir that IAConstants has been initialized with.
protected  void setAttributesOn(Element element)
           
protected  void setSaveToFileName(String file_name)
           
private static void usage(int status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_ELEMENT

private static final String ROOT_ELEMENT
See Also:
Constant Field Values

ROOT_VERSION

private static final String ROOT_VERSION
See Also:
Constant Field Values

ROOT_COMMENT

private static final String ROOT_COMMENT
See Also:
Constant Field Values

doc_

private Document doc_

root_

private Element root_

saveFileName_

private String saveFileName_

extensionNodes_

private ArrayList extensionNodes_
Constructor Detail

InstallerComponentMap

public InstallerComponentMap(File file)
                      throws IAException
Read an Installer component map from the given file.

Parameters:
file -
Throws:
IAException - if the file is not found or if the contents of the file are malformed.

InstallerComponentMap

public InstallerComponentMap(InputStream input_stream)
                      throws IAException
Read an Installer component map from the given file.

Parameters:
input_stream - InputStream containing just the Installer component map content. The stream will not be closed when reading is complete.
Throws:
IAException - if the file is not found or if the contents of the file are malformed.

InstallerComponentMap

InstallerComponentMap(Element element)
                throws IAException
Method Detail

analyzeDocument

private void analyzeDocument(Element element)
                      throws IAException
Scan the DOM document for Installer component map information.

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

getRootElementName

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

getRootElement

public Element getRootElement()
Get the Installer component map root element.

Supported API: false

Extendable: false

Returns:
Installer root element

getSaveToFileName

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

setSaveToFileName

protected void setSaveToFileName(String file_name)

debugGetExtensionNodes

ArrayList debugGetExtensionNodes()

main

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

For usage information, execute:

  java -cp ... com.ptc.windchill.instassm.InstallerComponentMap component_map_file
at the command prompt.

This command only reads the InstallerComponentMap file. This command's main purpose is to provide an interface for loading an installer's component map as an element in a .ia file.

Throws:
Exception

usage

private static void usage(int status)

checkGetOptarg

static String checkGetOptarg(int c,
                             String arg)

checkGetOptarg

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

saveToRegistryDir

public void saveToRegistryDir()
                       throws IAException
Save the fragment as a file into the registry dir that IAConstants has been initialized with.

Throws:
IAException
See Also:
IAConstants

saveToDir

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

Throws:
IAException