|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.clients.versioncontrol.workspacecache.WorkspaceInfo
public final class WorkspaceInfo
Holds the properties of a cached workspace.
Constructor Summary | |
---|---|
WorkspaceInfo(com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalServerInfo serverInfo,
Workspace workspace)
|
Method Summary | |
---|---|
static boolean |
areMappedPathSetsEqual(java.lang.String[] set1,
java.lang.String[] set2)
Returns true if two sets of mapped local paths are identical. |
static boolean |
areOwnerAliasesSetsEqual(java.lang.String[] set1,
java.lang.String[] set2)
Returns true if two sets of owner aliases are identical. |
int |
compareTo(WorkspaceInfo other)
|
void |
copyLocalMetadata(WorkspaceInfo oldInfo)
This method is used by Workstation to keep local metadata when updating the cache after querying the server. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
formatWorkspaceNameForException(WorkspaceInfo conflictingWorkspace)
Formats the conflicting workspace name for exception when there is a conflict. |
java.lang.String |
getComment()
|
java.lang.String |
getComputer()
|
java.lang.String |
getDisplayName()
|
SavedCheckin |
getLastSavedCheckin()
|
WorkspaceLocation |
getLocation()
|
java.lang.String[] |
getMappedPaths()
The mapped local paths of the workspace. |
java.lang.String |
getMapping(java.lang.String path)
This method is for LocalCache to use. |
java.lang.String |
getName()
|
WorkspaceOptions |
getOptions()
|
java.lang.String[] |
getOwnerAliases()
|
java.lang.String |
getOwnerDisplayName()
|
java.lang.String |
getOwnerName()
|
java.lang.String |
getQualifiedName()
|
java.lang.String |
getSecurityToken()
|
com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalServerInfo |
getServer()
|
com.microsoft.tfs.util.GUID |
getServerGUID()
|
java.net.URI |
getServerURI()
|
LocalWorkspaceState |
getState()
|
Workspace |
getWorkspace(TFSTeamProjectCollection collection)
Get the workspace object that matches this CachedWorkspace . |
int |
hashCode()
|
static WorkspaceInfo |
loadFromXML(com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalServerInfo serverInfo,
org.w3c.dom.Element workspaceInfoNode)
Creates an instance from the XML representation used in the cache file. |
void |
markClean()
Only used by LocalCache to clear the state after a cache merge. |
boolean |
ownerNameMatches(java.lang.String ownerName)
Returns true if the owner name matches any of the valid owner names for this workspace. |
void |
saveAsXML(org.w3c.dom.Element parent)
Saves this instance to the XML format used in the cache file. |
void |
setLastSavedCheckin(SavedCheckin value,
Workstation workstationToSave)
Sets the settings associated with the last saved checkin attempt |
void |
setState(LocalWorkspaceState newState)
|
java.lang.String |
toString()
|
void |
update(WorkspaceInfo ws,
boolean fromCache)
Updates this workspace using the comment, computer, and mappings of the workspace object passed in, which must have the same name, owner, and repository as this workspace instance. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WorkspaceInfo(com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalServerInfo serverInfo, Workspace workspace)
Method Detail |
---|
public Workspace getWorkspace(TFSTeamProjectCollection collection)
CachedWorkspace
.
collection
- the team project collection to use (must not be null
)
null
if it was not found on the
serverpublic java.lang.String getMapping(java.lang.String path)
path
- the path
public boolean equals(java.lang.Object obj)
Returns true if the WorkspaceInfo
objects are equal according to
workspace name, owner, and repository.
equals
in class java.lang.Object
public int hashCode()
Gets the hash code for this instance (computed from name, owner, and repository guid).
hashCode
in class java.lang.Object
public int compareTo(WorkspaceInfo other)
Compares two workspace info objects, first comparing the server names, then comparing the workspace names, and finally comparing owners.
compareTo
in interface java.lang.Comparable<WorkspaceInfo>
public static WorkspaceInfo loadFromXML(com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalServerInfo serverInfo, org.w3c.dom.Element workspaceInfoNode)
serverINfo
- the workspace's host serverworkspaceInfoNode
- the node to load from
WorkspaceInfo
created from the XMLpublic void saveAsXML(org.w3c.dom.Element parent)
parent
- the "ServerInfo" element to append a
node to with this WorkspaceInfo
's datapublic void markClean()
public java.lang.String formatWorkspaceNameForException(WorkspaceInfo conflictingWorkspace)
conflictingWorkspace
- the workspace that conflicts
public static boolean areMappedPathSetsEqual(java.lang.String[] set1, java.lang.String[] set2)
set1
- the first set (must not be null
)set2
- the second set (must not be null
)
public static boolean areOwnerAliasesSetsEqual(java.lang.String[] set1, java.lang.String[] set2)
set1
- The first set of owner aliases (must not be null
)set2
- The second set of owner aliases (must not be null
)
public void update(WorkspaceInfo ws, boolean fromCache)
ws
- the workspace from which to get updated info (must not be
null
)fromCache
- if true, this update is from the cache file and will not affected
the modification state; use false for updates from the serverpublic void copyLocalMetadata(WorkspaceInfo oldInfo)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean ownerNameMatches(java.lang.String ownerName)
ownerName
- the name to match (must not be null
or empty)public java.net.URI getServerURI()
public com.microsoft.tfs.util.GUID getServerGUID()
public java.lang.String getName()
public java.lang.String getOwnerName()
public java.lang.String getOwnerDisplayName()
public java.lang.String[] getOwnerAliases()
public java.lang.String getDisplayName()
public java.lang.String getQualifiedName()
public java.lang.String getComputer()
public java.lang.String getComment()
public WorkspaceLocation getLocation()
WorkspaceLocation
that indicates the location where
data (pending changes, local versions) for this workspace are
storedpublic java.lang.String[] getMappedPaths()
public SavedCheckin getLastSavedCheckin()
public void setLastSavedCheckin(SavedCheckin value, Workstation workstationToSave)
public java.lang.String getSecurityToken()
null
for
older servers)public WorkspaceOptions getOptions()
public com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalServerInfo getServer()
public LocalWorkspaceState getState()
public void setState(LocalWorkspaceState newState)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |