com.starbase.starteam
Class LinkFactory

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

public class LinkFactory
extends java.lang.Object

Supports bulk link creation, on servers that support it.

See Also:
SupportedFeatures.hasBulkCreateLinks()

Constructor Summary
LinkFactory()
          Creates a LinkFactory.
 
Method Summary
 Link createLink(Item parent, int parentRevision, Item child, int childRevision)
          Creates a new link object.
 Link createLink(Item parent, Item child)
          Creates a new link object.
 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 updateAll()
          Saves the links created by this LinkFactory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkFactory

public LinkFactory()
Creates a LinkFactory.

Method Detail

createLink

public Link createLink(Item parent,
                       Item child)
Creates a new link object. The link is not actually created in the StarTeam repository until updateAll() is called.

Parameters:
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.
Returns:
The resulting link object, not yet created in the StarTeam repository.
See Also:
LinkFactory.updateAll()

createLink

public Link createLink(Item parent,
                       int parentRevision,
                       Item child,
                       int childRevision)
Creates a new link object. The link is not actually created in the StarTeam repository until updateAll() is called.

Parameters:
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.
Returns:
The resulting link object, not yet created in the StarTeam repository.
See Also:
LinkFactory.updateAll()

linkAndPin

public 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. The link is not actually created in the StarTeam repository until updateAll() is called.

Parameters:
parent - The parent endpoint of the link.
child - The child endpoint of the link.
comment - The link comment.
updateExistingLink - If true this will modify a link that already exists between the two items rather than creating a new link.
Returns:
The resulting link object, not yet created in the StarTeam repository.
See Also:
LinkFactory.updateAll()

updateAll

public void updateAll()
Saves the links created by this LinkFactory. For servers that support bulk link creation, the number of commands issued is minimized.



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