|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.starbase.starteam.Link
Represents an instance of an association between two items.
| Constructor Summary | |
Link(Item parent,
boolean bPinParent,
Item child,
boolean bPinChild,
java.lang.String comment)
Deprecated. Use Link(Item parent, Item child) instead. |
|
Link(Item parent,
int parentRevision,
Item child,
int childRevision)
Creates a new link object. |
|
Link(Item parent,
Item child)
Creates a new link object. |
|
| Method Summary | |
Link |
copy()
Copies this link, creating a new one with the same content. |
void |
delete()
Terminates the association of the linked items. |
boolean |
equals(java.lang.Object source)
returns true if this object instance is equal to the source |
LinkEndpoint |
getChildEndpoint()
Returns a reference to the "child" item in this link. |
java.lang.String |
getComment()
Returns the comment associated with this link. |
OLEDate |
getCreatedTime()
Returns the time at which this link was created. |
int |
getCreatedUserID()
Returns the user ID of the user who created this link. |
int |
getID()
Returns an integer that identifies this link. |
LinkEndpoint |
getParentEndpoint()
Returns a reference to the "parent" item in this link. |
int |
getParentFolderItemID()
Returns the ItemID of the linked item's parent folder if the item is in the current view, otherwise -1. |
Server |
getServer()
Returns the server object to which the parent endpoint of this link belongs. |
View |
getView()
Returns the view to which the parent endpoint of this link belongs. |
int |
hashCode()
returns a unique hash for all instances of this type |
boolean |
isEqualTo(Link other)
Determines whether or not the contents of two links are the same. |
static Link |
linkAndPin(Item parent,
Item child,
java.lang.String comment,
boolean updateExistingLink)
Creates a new link between two items and pins the link endpoints to the specified item revisions. |
void |
pinChild(Item newChild)
Pin the child endpoint of the link. |
void |
pinParent(Item newParent)
Pin the parent endpoint of the link. |
Item |
resolveChild()
Resolves the child endpoint of this link. |
Item |
resolveParent()
Resolves the parent endpoint of this link. |
void |
setComment(java.lang.String comment)
|
java.lang.String |
toDebugString()
|
void |
unpinChild()
Unpin the child endpoint of the link. |
void |
unpinParent()
Unpin the parent endpoint of the link. |
void |
update()
Persists the link. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Link(Item parent,
Item child)
parent - The parent end of the link. The link becomes visible at the first revision of this item's branch.child - The child end of the link. The link becomes visible at the first revision of this item's branch.
public Link(Item parent,
int parentRevision,
Item child,
int childRevision)
parent - The parent end of the link.parentRevision - The revision number of the first revision in the parent item's history for which this link is visible.
If the value is -1, defaults to the first revision in the parent item's branch.child - The child end of the link.childRevision - The revision number of the first revision in the child item's history for which this link is visible.
If the value is -1, defaults to the first revision in the child item's branch.
public Link(Item parent,
boolean bPinParent,
Item child,
boolean bPinChild,
java.lang.String comment)
parent - The parent end of the link.bPinParent - If true, pin the parent item at the revision specified by the item.child - The child end of the link.bPinChild - If true, pin the child item at the revision specified by the item.comment - The comment to assocate with this link.| Method Detail |
public LinkEndpoint getChildEndpoint()
public int getID()
public int getParentFolderItemID()
public OLEDate getCreatedTime()
public int getCreatedUserID()
public View getView()
public Server getServer()
public java.lang.String getComment()
public void setComment(java.lang.String comment)
public Item resolveParent()
Link.resolveChild(),
View.getDisembodiedItem(int, com.starbase.starteam.Type),
View.getHistoryForItemID(int, com.starbase.starteam.Type),
Item.isDisembodied()public Item resolveChild()
Link.resolveParent(),
View.getDisembodiedItem(int, com.starbase.starteam.Type),
View.getHistoryForItemID(int, com.starbase.starteam.Type),
Item.isDisembodied()public LinkEndpoint getParentEndpoint()
public void pinParent(Item newParent)
newParent - the Item to which this endpoint should be pinned. Note that this item must lie in the history path of
the original item for the endpoint, and cannot be an earlier revision than the earliest revision for
the endpoint.public void unpinParent()
public void pinChild(Item newChild)
newChild - the Item to which this endpoint should be pinned. Note that this item must lie in the history path of
the original item for the endpoint, and cannot be an earlier revision than the earliest revision for
the endpoint.public void unpinChild()
public void delete()
public void update()
public static Link linkAndPin(Item parent,
Item child,
java.lang.String comment,
boolean updateExistingLink)
parent - the parent end of the linkchild - the child end of the linkcomment - the link commentupdateExistingLink - if true this will modify a link that already exists between the two items rather than creating a new link.
public java.lang.String toDebugString()
public boolean isEqualTo(Link other)
other - The link to be compared to this one.
public Link copy()
public boolean equals(java.lang.Object source)
equals in class java.lang.Objectsource - Object the source to comapre with
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||