hudson.plugins.tfs.model
Class Workspaces

java.lang.Object
  extended by hudson.plugins.tfs.model.Workspaces
All Implemented Interfaces:
ListWorkspacesCommand.WorkspaceFactory

public class Workspaces
extends java.lang.Object
implements ListWorkspacesCommand.WorkspaceFactory

Class that creates, deletes and gets workspaces from a TeamFoundationServer.

Author:
Erik Ramfelt

Constructor Summary
Workspaces(Server server)
           
 
Method Summary
 Workspace createWorkspace(java.lang.String name, java.lang.String computer, java.lang.String owner, java.lang.String comment)
           
 void deleteWorkspace(Workspace workspace)
          Deletes the workspace from the server
 boolean exists(java.lang.String workspaceName)
          Returns the if the workspace with the specified name exists on the server
 boolean exists(Workspace workspace)
          Returns the if the workspace exists on the server
 Workspace getWorkspace(java.lang.String workspaceName)
          Returns the workspace with the specified name
 Workspace newWorkspace(java.lang.String name)
          Create workspace on server and return a workspace object with the specified name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Workspaces

public Workspaces(Server server)
Method Detail

getWorkspace

public Workspace getWorkspace(java.lang.String workspaceName)
                       throws java.io.IOException,
                              java.lang.InterruptedException
Returns the workspace with the specified name

Parameters:
workspaceName - the name of the workspace name
Returns:
the workspace with the specified name; null if it wasnt found
Throws:
java.io.IOException
java.lang.InterruptedException

exists

public boolean exists(java.lang.String workspaceName)
               throws java.io.IOException,
                      java.lang.InterruptedException
Returns the if the workspace with the specified name exists on the server

Parameters:
workspaceName - the name of the workspace
Returns:
true if the workspace exists on server; false otherwise
Throws:
java.io.IOException
java.lang.InterruptedException

exists

public boolean exists(Workspace workspace)
               throws java.io.IOException,
                      java.lang.InterruptedException
Returns the if the workspace exists on the server

Parameters:
workspace - the workspace
Returns:
true if the workspace exists on server; false otherwise
Throws:
java.io.IOException
java.lang.InterruptedException

newWorkspace

public Workspace newWorkspace(java.lang.String name)
                       throws java.io.IOException,
                              java.lang.InterruptedException
Create workspace on server and return a workspace object with the specified name

Parameters:
name - the name of the new workspace
Returns:
a workspace
Throws:
java.io.IOException
java.lang.InterruptedException

deleteWorkspace

public void deleteWorkspace(Workspace workspace)
                     throws java.io.IOException,
                            java.lang.InterruptedException
Deletes the workspace from the server

Parameters:
workspace - the workspace to delete
Throws:
java.io.IOException
java.lang.InterruptedException

createWorkspace

public Workspace createWorkspace(java.lang.String name,
                                 java.lang.String computer,
                                 java.lang.String owner,
                                 java.lang.String comment)
Specified by:
createWorkspace in interface ListWorkspacesCommand.WorkspaceFactory


Copyright © 2011. All Rights Reserved.