com.starteam
Class StarTeamURL

java.lang.Object
  extended by com.starteam.StarTeamURL

public final class StarTeamURL
extends java.lang.Object

StarTeamURL uses a URL-like syntax to reference a StarTeam Server, Project, View or Item. it provides a convenient way to locate important StarTeam objects.

StarTeamURL supports the following syntax:

starteam://username:password@hostname:port/Project/View/FolderA/FolderB/... (This is the general form of the StarTeam URL naming scheme SCHEME=NAME, which is the default StarTeam URL naming scheme.

StarTeamURL fully supports the generalized StarTeam URL naming scheme by Name or ID. (see the document StarTeam-URL-spec.html) However, URLs in the more generalized form are harder to construct 'by hand' and are best generated using the SDK method Application.toStarTeamURL

See Also:
Application.resolve(String), Application.toStarTeamURL(Object, boolean, boolean), Server.Server(ServerInfo)

Constructor Summary
StarTeamURL(Application app, java.lang.String url)
          Construct a new StarTeamURL with the given specifier.
 
Method Summary
 Folder resolveFolder()
          Connects to and logs on to the specified server and finds the specified folder.
 Project resolveProject()
          Connects to and logs on to the specified server and finds the specified project.
 Server resolveServer()
          Connect to and log on to a server object specified by the StarTeam url string.
 View resolveView()
          Connects to and logs on to the specified server and finds the specified view.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StarTeamURL

public StarTeamURL(Application app,
                   java.lang.String url)
Construct a new StarTeamURL with the given specifier. The most general form of the URL is: "starteam://username:password@hostname:port/projectname/view/folder/folder/"

Parameters:
app - the Application in whose context the URL will be resolved
url - the string specifier of the StarTeamURL.
Method Detail

resolveServer

public Server resolveServer()
Connect to and log on to a server object specified by the StarTeam url string. The form of the url must at least include the username, password, host address and port. For example: "starteam://fred:password@localhost:49201" Any additional information in the URL (e.g. project, view or folder) namespace identifiers will be ignored. Note that the password cannot contain the '@' symbol

Returns:
a logged in Server object

resolveProject

public Project resolveProject()
Connects to and logs on to the specified server and finds the specified project. The url must contain at least the username, password, host address and port, and project name. For example: "starteam://fred:password@localhost:49201/Project" The url may additionally include view and folder information but those will be ignored. Note that the password cannot contain the '@' symbol

Returns:
the specified Project object

resolveView

public View resolveView()
Connects to and logs on to the specified server and finds the specified view. The url must contain at least the username, password, host address and port, project and view name. For example: "starteam://fred:password@localhost:49201/Project/ViewName{!subViewName}" The url may additionally include folder information but it will be ignored. Note that the password cannot contain the '@' symbol

Returns:
the specified View object

resolveFolder

public Folder resolveFolder()
Connects to and logs on to the specified server and finds the specified folder. The url must contain the username, password, host address and port, project, view name and folder path. For example: "starteam://fred:password@localhost:49201/Project/ViewName/FolderA/FolderB" Note that the password cannot contain the '@' symbol

Returns:
the specified Folder object


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.