com.starbase.starteam
Class LinkEndpoint

java.lang.Object
  |
  +--com.starbase.starteam.LinkEndpoint

public class LinkEndpoint
extends java.lang.Object

Represents a link reference to an item.

See Also:
Link, Server.findLinks(com.starbase.starteam.Item), View.resolveLinkEndpoint(com.starbase.starteam.LinkEndpoint)

Method Summary
 LinkEndpoint copy()
          Copies this link endpoint, creating a new one with the same content.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 java.lang.String getDotNotation()
          Returns the dot notation for the revision being referenced by this link.
 int getFolderObjectID()
          Returns the object ID for the parent folder of the linked item.
 Item getItem()
          Resolves this link endpoint.
 int getItemID()
          Returns the itemID of the item being referenced.
 int getObjectID()
          Returns the object ID of the underlying object referenced by the item.
 int getRevisionNumber()
          Returns the revision number for the specific revision this link enpoint references.
 Type getType()
          Returns the Type of the item for this link endpoint.
 int getViewID()
          Returns the view ID in which the referenced item exists.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean isEqualTo(LinkEndpoint other)
          Determines whether or not the contents of two link endpoints are the same.
 boolean isPinned()
          Returns true if the item referenced is fixed at a specific revision such that the association does not propogate to newer versions of the item.
 java.lang.String toDebugString()
          Returns a debug string representation of this link endpoint.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public Type getType()
Returns the Type of the item for this link endpoint.

Returns:
the type of item being referenced
See Also:
TypedResource.getType()

getItemID

public int getItemID()
Returns the itemID of the item being referenced.

Returns:
the itemID of the item being referenced
See Also:
Item.getItemID()

getObjectID

public int getObjectID()
Returns the object ID of the underlying object referenced by the item. This value is only meaningful if the link is pinned. This value might be -1 if the link is not pinned. You should always use the isPinned method to determine if a link is pinned.

Returns:
the object ID for the referenced item. Note that this value is only meaningful if the endpoint is pinned. The value may be -1 if the endpoint is not pinned, or may in fact be an object ID if this is the "child" endpoint of the link. In any case, always check the value of the"Pinned" property to determine whether the endpoint is pinned before relying on this value.
See Also:
LinkEndpoint.isPinned(), PropertyNames.OBJECT_ID

getRevisionNumber

public int getRevisionNumber()
Returns the revision number for the specific revision this link enpoint references. Will be -1 if the link endpoint is not "pinned"

Returns:
the revision number for the specific revision of a pinned endpoint, or -1 if the endpoint is not pinned.
See Also:
LinkEndpoint.isPinned(), PropertyNames.REVISION_NUMBER

getDotNotation

public java.lang.String getDotNotation()
Returns the dot notation for the revision being referenced by this link. This value will be meaningless if the endpoint is not pinned.

Returns:
the dot notation for the item referenced by this link if the endpoint is pinned. Not meaningful if the endpoint is not pinned.
See Also:
LinkEndpoint.isPinned(), PropertyNames.DOTNOTATION

getViewID

public int getViewID()
Returns the view ID in which the referenced item exists. Note that this may not be the same as the view in which the link was obtained.

Returns:
the view ID in which the referenced item exists.
See Also:
View.getViewID()

getFolderObjectID

public int getFolderObjectID()
Returns the object ID for the parent folder of the linked item.

Returns:
the object ID for the parent folder of the linked item.
See Also:
PropertyNames.OBJECT_ID

isPinned

public boolean isPinned()
Returns true if the item referenced is fixed at a specific revision such that the association does not propogate to newer versions of the item.

Returns:
true if this link endpoint is pinned to a specific revision.

getItem

public Item getItem()
Resolves this link endpoint.

Returns:
The link endpoint, resolved to a new "disembodied" Item.
See Also:
Item, Item.isDisembodied(), View.getDisembodiedItem(int, com.starbase.starteam.Type)

toDebugString

public java.lang.String toDebugString()
Returns a debug string representation of this link endpoint.

Returns:
a debug string representation of this link endpoint.

isEqualTo

public boolean isEqualTo(LinkEndpoint other)
Determines whether or not the contents of two link endpoints are the same.

Parameters:
other - The link endpoint to be compared to this one.
Returns:
true if the link endpoints are the same; false otherwise.

copy

public LinkEndpoint copy()
Copies this link endpoint, creating a new one with the same content.

Returns:
A new copy of this link endpoint.

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.