Copyright @ 2002 SAP. All Rights Reserved.

com.sap.tc.complib
Class DCReference

java.lang.Object
  |
  +--com.sap.tc.complib.DCReference
All Implemented Interfaces:
ComponentReference, Identifiable

public final class DCReference
extends java.lang.Object
implements ComponentReference

References to development components.


Constructor Summary
DCReference()
          Creates a new empty instance.
DCReference(java.lang.String name, java.lang.String vendor)
          Creates a new instance with given name and vendor id.
DCReference(java.lang.String name, java.lang.String vendor, java.lang.String alias)
          Creates a new instance with given name and vendor id.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines whether the given DCReference object is "equal to" this one.
 java.lang.String getName()
          Returns the name of the referenced component
 java.lang.String getSCAlias()
          Returns the optional SC alias of the referenced component
 java.lang.String getUniqueKey()
           
 java.lang.String getVendor()
          Returns the vendor of the referenced component
 int hashCode()
           
 void serialize(XMLWriter writer)
          Serializes the reference to the given XMLWriter.
 void setName(java.lang.String name)
          Sets the name of the referenced component
 void setSCAlias(java.lang.String alias)
          Sets the optional SC alias of the referenced component
 void setVendor(java.lang.String vendor)
          Sets the vendor of the referenced component
 java.lang.String toString()
           
 void validate()
          Verifies that the component reference is valid (according to the DTD).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DCReference

public DCReference()
Creates a new empty instance.

DCReference

public DCReference(java.lang.String name,
                   java.lang.String vendor)
Creates a new instance with given name and vendor id.
Parameters:
name - the name of the destination component.
vendor - the vendor id of the destination component.

DCReference

public DCReference(java.lang.String name,
                   java.lang.String vendor,
                   java.lang.String alias)
Creates a new instance with given name and vendor id.
Parameters:
name - the name of the destination component.
vendor - the vendor id of the destination component.
alias - the alias of a software component.
Method Detail

getName

public java.lang.String getName()
Returns the name of the referenced component
Specified by:
getName in interface ComponentReference

setName

public void setName(java.lang.String name)
Sets the name of the referenced component
Specified by:
setName in interface ComponentReference

getVendor

public java.lang.String getVendor()
Returns the vendor of the referenced component
Specified by:
getVendor in interface ComponentReference

setVendor

public void setVendor(java.lang.String vendor)
Sets the vendor of the referenced component
Specified by:
setVendor in interface ComponentReference

getSCAlias

public java.lang.String getSCAlias()
Returns the optional SC alias of the referenced component
Specified by:
getSCAlias in interface ComponentReference

setSCAlias

public void setSCAlias(java.lang.String alias)
Sets the optional SC alias of the referenced component
Specified by:
setSCAlias in interface ComponentReference

validate

public void validate()
              throws ValidationException
Verifies that the component reference is valid (according to the DTD).
Specified by:
validate in interface ComponentReference
Throws:
ValidationException - if the object is not valid.

serialize

public void serialize(XMLWriter writer)
               throws ValidationException
Serializes the reference to the given XMLWriter.
Specified by:
serialize in interface ComponentReference
Parameters:
writer - the XMLWriter to use for serialization.

equals

public boolean equals(java.lang.Object obj)
Determines whether the given DCReference object is "equal to" this one. Compares name, vendor and alias (if defined).
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getUniqueKey

public java.lang.String getUniqueKey()
Specified by:
getUniqueKey in interface Identifiable
Following copied from interface: com.sap.tc.complib.Identifiable
Returns:
a unique key to identify the instance

Copyright @ 2002 SAP. All Rights Reserved.