com.starteam
Class LinkValue.WebCacheLinkValue

java.lang.Object
  extended by com.starteam.LinkValue.WebCacheLinkValue
Enclosing class:
LinkValue

public static final class LinkValue.WebCacheLinkValue
extends java.lang.Object

The value of a Link Property


Method Summary
static LinkValue.WebCacheLinkValue create(ArtifactCacheManager.Context cntxt, java.lang.String url, java.lang.String description)
          Creates a WebCacheLinkValue for the given URL.
 boolean equals(java.lang.Object o)
          Test this object for equality with another
 java.lang.String getDescription()
          Gets a description of the linked item.
 DotNotation getDotNotation()
          Attempts to extract version information in the form of a DotNotation from this LinkValue.
 int getID()
          Gets the VMID of the linked item.
static LinkValue.WebCacheLinkValue[] getTargets(LinkValue.WebCacheLinkValue[] sources)
          Returns the set of target Link Values reachable from the specified set of sources Each source that represents a ChangePackage is considered, the returned link values represent the Target Items of the Changes Each source that represents a ProcessTask is also considered, the returned link values represent the Target Items of the Links
 DateTime getTimeStamp()
          Gets the revision timestamp associated with this LinkValue.
 ViewMember.Type.WebCacheViewMemberType getType()
          Returns the Type of the link value for internal links
 java.lang.String getURL()
          Gets a URL that refers to the linked item.
 java.lang.String getVersion()
          Attempts to extract version information from the VersionID of this LinkValue.
 java.lang.String getVersionID()
          Gets the VersionID of this LinkValue, in raw form.
 View.WebCacheView getView()
          Return the view targeted by the StarTeam Item represented by this link value or NULL for external links Useful for applications that may not have cached items of this type in this view but need to do so using delayed caching or discovery based caching models
 int hashCode()
          Return a hash code for this object
 boolean isFloating()
          returns true if this LinkValue is floating w.r.t its Trace
 boolean isInternalLink()
          Determines whether or not this LinkValue is an internal reference to a StarTeam view member on the same server.
 boolean isInternalTo(Project.WebCacheProject project)
          Determines whether or not this is an internal link to a StarTeam item in the same project as the given one.
 boolean isInternalTo(View.WebCacheView view)
          Determines whether or not this is an internal link to a StarTeam item in the same view as the given one.
 boolean isPinned()
          returns true if this LinkValue is pinned to its Trace
 boolean isStarTeamLink()
          Determines whether or not this LinkValue references a StarTeam view member.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static LinkValue.WebCacheLinkValue create(ArtifactCacheManager.Context cntxt,
                                                 java.lang.String url,
                                                 java.lang.String description)
Creates a WebCacheLinkValue for the given URL.

Parameters:
cntxt - the context of the operation
url - String the URL to the resource
description - String a user friendly description
Returns:
WebCacheLinkValue

getDescription

public java.lang.String getDescription()
Gets a description of the linked item.

Returns:
A description of the linked item.

isInternalLink

public boolean isInternalLink()
Determines whether or not this LinkValue is an internal reference to a StarTeam view member on the same server.

Returns:
boolean true if this LinkValue is an internal reference to a StarTeam view member on the same server; false otherwise.

getID

public int getID()
Gets the VMID of the linked item. Returns -1 if this LinkValue does not refer to an internal StarTeam item.

Returns:
int the ID of the linked item

isStarTeamLink

public boolean isStarTeamLink()
Determines whether or not this LinkValue references a StarTeam view member.

Returns:
boolean true if this LinkValue references a StarTeam item, either on this server or some other one.

isInternalTo

public boolean isInternalTo(View.WebCacheView view)
Determines whether or not this is an internal link to a StarTeam item in the same view as the given one.

Parameters:
view - the View to test
Returns:
boolean
See Also:
LinkValue.WebCacheLinkValue.isInternalLink(), LinkValue.isInternalTo(Project)

isInternalTo

public boolean isInternalTo(Project.WebCacheProject project)
Determines whether or not this is an internal link to a StarTeam item in the same project as the given one.

Parameters:
project - the Project to test
Returns:
boolean true if the link is internal to the project
See Also:
LinkValue.WebCacheLinkValue.isInternalLink(), LinkValue.isInternalTo(View)

getURL

public java.lang.String getURL()
Gets a URL that refers to the linked item.

Returns:
A URL that refers to the linked item.

getView

public View.WebCacheView getView()
Return the view targeted by the StarTeam Item represented by this link value or NULL for external links Useful for applications that may not have cached items of this type in this view but need to do so using delayed caching or discovery based caching models

Returns:
the view targeted by the StarTeam Item represented by this link value

getTimeStamp

public DateTime getTimeStamp()
Gets the revision timestamp associated with this LinkValue.

Returns:
DateTime the revision timestamp or NULL

isPinned

public boolean isPinned()
returns true if this LinkValue is pinned to its Trace

Returns:
true if this LinkValue is pinned to its Trace

isFloating

public boolean isFloating()
returns true if this LinkValue is floating w.r.t its Trace

Returns:
true if this LinkValue is floating w.r.t. its Trace

getVersionID

public java.lang.String getVersionID()
Gets the VersionID of this LinkValue, in raw form. The VersionID identifies a specific version of the referenced artifact.

Returns:
String
See Also:
LinkValue.WebCacheLinkValue.getVersion(), LinkValue.WebCacheLinkValue.getDotNotation()

getVersion

public java.lang.String getVersion()
Attempts to extract version information from the VersionID of this LinkValue.

This method assumes that the VersionID is formatted as a set of attribute value pairs, as would appear in a URI; for example, "?v=10". This method generally returns the first value, although special provision if made for StarTeam LinkValues that contain a DotNotation of the form "?dot=1.0".

Returns:
String
See Also:
LinkValue.WebCacheLinkValue.getVersionID(), LinkValue.WebCacheLinkValue.getDotNotation()

getType

public ViewMember.Type.WebCacheViewMemberType getType()
Returns the Type of the link value for internal links

Returns:
the Type of the link value for internal links

getTargets

public static LinkValue.WebCacheLinkValue[] getTargets(LinkValue.WebCacheLinkValue[] sources)
Returns the set of target Link Values reachable from the specified set of sources Each source that represents a ChangePackage is considered, the returned link values represent the Target Items of the Changes Each source that represents a ProcessTask is also considered, the returned link values represent the Target Items of the Links

Returns:
the set of target Link Values reachable from the specified set of sources

getDotNotation

public DotNotation getDotNotation()
Attempts to extract version information in the form of a DotNotation from this LinkValue. StarTeam LinkValues always specify version information in the form "?dot=1.0".

Returns:
A DotNotation, or null if the VersionID is not in the above format.
See Also:
LinkValue.WebCacheLinkValue.getVersion(), LinkValue.WebCacheLinkValue.getVersionID()

equals

public boolean equals(java.lang.Object o)
Test this object for equality with another

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to test against

hashCode

public int hashCode()
Return a hash code for this object

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this object


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