com.ptc.windchill.instassm
Class InstalledAssembly.InstalledComponent

java.lang.Object
  extended bycom.ptc.windchill.instassm.InstalledAssembly.InstalledComponent
Enclosing class:
InstalledAssembly

public class InstalledAssembly.InstalledComponent
extends Object


Field Summary
private  ReleaseId componentVersion_
           
private  String id_
           
private  String name_
           
private  ReleaseId productVersion_
           
private  String shortName_
           
 
Constructor Summary
(package private) InstalledAssembly.InstalledComponent(Element element)
          Create an installed component from the InstalledComponent Element in the Installation Registry on the system.
(package private) InstalledAssembly.InstalledComponent(String id)
          Create an installed component from an installer component based on the component's unique id.
 
Method Summary
 int compareComponentVersion(InstalledAssembly.InstalledComponent other)
           
 int compareProductVersion(InstalledAssembly.InstalledComponent other)
           
private  ReleaseId createComponentVersion(String version)
           
 String getComponentId()
           
 ReleaseId getComponentVersion()
           
 String getName()
           
 ReleaseId getProductVersion()
           
 String getShortName()
           
protected  void setAttributesOn(Element element)
           
protected  void setVersionAttributeOn(Element element, String attr, ReleaseId version)
           
 String toString()
           
 void updateComponentVersion(String new_version)
          new_version is just the numbers
 void updateProductVersion(ReleaseId new_rid)
          Update the product version of this installed component to match the version of the containing assembly.
private  void validateComponent(Element elem, String element_type)
           
private  boolean validateComponentHasAttribute(Element elem, String attr, String element_type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id_

private String id_

name_

private String name_

shortName_

private String shortName_

componentVersion_

private ReleaseId componentVersion_

productVersion_

private ReleaseId productVersion_
Constructor Detail

InstalledAssembly.InstalledComponent

InstalledAssembly.InstalledComponent(String id)
                               throws IAException
Create an installed component from an installer component based on the component's unique id. It gathers its attributes from those stored on other elements, e.g. ComponentMap.


InstalledAssembly.InstalledComponent

InstalledAssembly.InstalledComponent(Element element)
                               throws IAException
Create an installed component from the InstalledComponent Element in the Installation Registry on the system.

Method Detail

createComponentVersion

private ReleaseId createComponentVersion(String version)
                                  throws IAException
Throws:
IAException

validateComponent

private void validateComponent(Element elem,
                               String element_type)
                        throws IAException
Throws:
IAException

validateComponentHasAttribute

private boolean validateComponentHasAttribute(Element elem,
                                              String attr,
                                              String element_type)
                                       throws IAException
Throws:
IAException

getComponentId

public String getComponentId()

getName

public String getName()

getShortName

public String getShortName()

getComponentVersion

public ReleaseId getComponentVersion()

getProductVersion

public ReleaseId getProductVersion()

compareProductVersion

public int compareProductVersion(InstalledAssembly.InstalledComponent other)

compareComponentVersion

public int compareComponentVersion(InstalledAssembly.InstalledComponent other)

toString

public String toString()

setAttributesOn

protected void setAttributesOn(Element element)
                        throws IAException
Throws:
IAException

setVersionAttributeOn

protected void setVersionAttributeOn(Element element,
                                     String attr,
                                     ReleaseId version)
                              throws IAException
Throws:
IAException

updateComponentVersion

public void updateComponentVersion(String new_version)
                            throws IAException
new_version is just the numbers

Throws:
IAException

updateProductVersion

public void updateProductVersion(ReleaseId new_rid)
Update the product version of this installed component to match the version of the containing assembly.