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 java.lang.Object
implements JazzConfigurationProvider

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

Author:
deluan

Field Summary
static java.lang.String SCM_CMD
           
 
Constructor Summary
JazzClient(hudson.Launcher launcher, hudson.model.TaskListener listener, hudson.FilePath jobWorkspace, java.lang.String jazzExecutable, java.lang.String user, java.lang.String password, java.lang.String repositoryLocation, java.lang.String streamName, java.lang.String workspaceName)
           
 
Method Summary
 java.util.List<JazzChangeSet> accept()
          Call scm accept command.
 hudson.FilePath getJobWorkspace()
           
 java.lang.String getPassword()
           
 java.lang.String getRepositoryLocation()
           
 java.lang.String getStreamName()
           
 java.lang.String getUsername()
           
 java.lang.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 java.lang.String SCM_CMD
See Also:
Constant Field Values
Constructor Detail

JazzClient

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

hasChanges

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

Returns:
true if any changes are found
Throws:
java.io.IOException
java.lang.InterruptedException

load

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

Will load the workspace using the parameters defined.

Returns:
true on success
Throws:
java.io.IOException
java.lang.InterruptedException

stopDaemon

public boolean stopDaemon()
                   throws java.io.IOException,
                          java.lang.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:
java.io.IOException
java.lang.InterruptedException

accept

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

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

getRepositoryLocation

public java.lang.String getRepositoryLocation()
Specified by:
getRepositoryLocation in interface JazzConfigurationProvider

getWorkspaceName

public java.lang.String getWorkspaceName()
Specified by:
getWorkspaceName in interface JazzConfigurationProvider

getStreamName

public java.lang.String getStreamName()
Specified by:
getStreamName in interface JazzConfigurationProvider

getUsername

public java.lang.String getUsername()
Specified by:
getUsername in interface JazzConfigurationProvider

getPassword

public java.lang.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.