com.deluan.jenkins.plugins.rtc
Class JazzClient

java.lang.Object
  extended by com.deluan.jenkins.plugins.rtc.JazzClient
All Implemented Interfaces:
JazzConfigurationProvider

public class JazzClient
extends Object
implements JazzConfigurationProvider

Encapsulates the invocation of RTC's SCM Command Line Interface, "scm".

Author:
deluan

Field Summary
static String SCM_CMD
           
 
Constructor Summary
JazzClient(hudson.Launcher launcher, hudson.model.TaskListener listener, hudson.FilePath jobWorkspace, String jazzExecutable, String user, String password, String repositoryLocation, String streamName, String workspaceName)
           
 
Method Summary
 List<JazzChangeSet> accept()
          Call scm accept command.

 hudson.FilePath getJobWorkspace()
           
 String getPassword()
           
 String getRepositoryLocation()
           
 String getStreamName()
           
 String getUsername()
           
 String getWorkspaceName()
           
 boolean hasChanges()
          Returns true if there is any incoming changes to be accepted.
 boolean load()
          Call scm load command.
 boolean stopDaemon()
          Call scm daemon stop command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCM_CMD

public static final String SCM_CMD
See Also:
Constant Field Values
Constructor Detail

JazzClient

public JazzClient(hudson.Launcher launcher,
                  hudson.model.TaskListener listener,
                  hudson.FilePath jobWorkspace,
                  String jazzExecutable,
                  String user,
                  String password,
                  String repositoryLocation,
                  String streamName,
                  String workspaceName)
Method Detail

hasChanges

public boolean hasChanges()
                   throws IOException,
                          InterruptedException
Returns true if there is any incoming changes to be accepted.

Returns:
true if any changes are found
Throws:
IOException
InterruptedException

load

public boolean load()
             throws IOException,
                    InterruptedException
Call scm load command.

Will load the workspace using the parameters defined.

Returns:
true on success
Throws:
IOException
InterruptedException

stopDaemon

public boolean stopDaemon()
                   throws IOException,
                          InterruptedException
Call scm daemon stop command.

Will try to stop any daemon associated with the workspace.

This will be executed with the scm command, as the lscm command does not support this operation.

Returns:
true on success
Throws:
IOException
InterruptedException

accept

public List<JazzChangeSet> accept()
                           throws IOException,
                                  InterruptedException
Call scm accept command.

Returns:
all changeSets accepted, complete with affected paths and related work itens
Throws:
IOException
InterruptedException

getRepositoryLocation

public String getRepositoryLocation()
Specified by:
getRepositoryLocation in interface JazzConfigurationProvider

getWorkspaceName

public String getWorkspaceName()
Specified by:
getWorkspaceName in interface JazzConfigurationProvider

getStreamName

public String getStreamName()
Specified by:
getStreamName in interface JazzConfigurationProvider

getUsername

public String getUsername()
Specified by:
getUsername in interface JazzConfigurationProvider

getPassword

public String getPassword()
Specified by:
getPassword in interface JazzConfigurationProvider

getJobWorkspace

public hudson.FilePath getJobWorkspace()
Specified by:
getJobWorkspace in interface JazzConfigurationProvider


Copyright © 2004-2011. All Rights Reserved.