Esempio n. 1
0
 private ExecutionNode getExecDefNode(int nodeId) throws RemoteException, SCTMException {
   ExecutionNode node = execService.getNode(sessionId, nodeId);
   if (node == null)
     throw new SCTMException(
         MessageFormat.format(
             "Execution definition ''{0}'' does not exist. Check the build configuration.",
             nodeId));
   return node;
 }
Esempio n. 2
0
 /* (non-Javadoc)
  * @see hudson.plugins.sctmexecutor.service.ISCTMService#getExecutionResult(com.borland.tm.webservices.tmexecution.ExecutionHandle)
  */
 public ExecutionResult getExecutionResult(ExecutionHandle handle) throws SCTMException {
   try {
     return execService.getExecutionResult(this.sessionId, handle);
   } catch (RemoteException e) {
     if (handleLostSessionException(e)) return getExecutionResult(handle);
     LOGGER.log(Level.SEVERE, e.getMessage(), e);
     throw new SCTMException(
         MessageFormat.format(
             Messages.getString("SCTMService.err.commonFatalError"),
             e.getMessage())); // $NON-NLS-1$
   }
 }
Esempio n. 3
0
 /* (non-Javadoc)
  * @see hudson.plugins.sctmexecutor.service.ISCTMService#isFinished(com.borland.tm.webservices.tmexecution.ExecutionHandle)
  */
 public boolean isFinished(ExecutionHandle handle) throws SCTMException {
   try {
     return execService.getStateOfExecution(sessionId, handle) < 0;
   } catch (RemoteException e) {
     if (handleLostSessionException(e)) return isFinished(handle);
     LOGGER.log(Level.SEVERE, e.getMessage(), e);
     throw new SCTMException(
         MessageFormat.format(
             Messages.getString("SCTMService.err.commonFatalError"),
             e.getMessage())); // $NON-NLS-1$
   }
 }
Esempio n. 4
0
 /* (non-Javadoc)
  * @see hudson.plugins.sctmexecutor.service.ISCTMService#start(int)
  */
 public Collection<ExecutionHandle> start(int executionId) throws SCTMException {
   try {
     ExecutionHandle[] handles = execService.startExecution(this.sessionId, executionId);
     logonRetryCount = 0;
     return convertToList(handles);
   } catch (RemoteException e) {
     if (handleLostSessionException(e)) return start(executionId);
     LOGGER.log(Level.WARNING, e.getMessage(), e);
     throw new SCTMException(
         MessageFormat.format(
             Messages.getString("SCTMService.err.commonFatalError"), e.getMessage()));
   }
 }
Esempio n. 5
0
 /* (non-Javadoc)
  * @see hudson.plugins.sctmexecutor.service.ISCTMService#start(int, java.lang.String)
  */
 public Collection<ExecutionHandle> start(int executionId, String buildNumber)
     throws SCTMException {
   try {
     ExecutionHandle[] handles =
         execService.startExecution(this.sessionId, executionId, buildNumber, 1, null);
     return convertToList(handles);
   } catch (RemoteException e) {
     if (handleLostSessionException(e)) {
       return start(executionId, buildNumber);
     }
     LOGGER.log(Level.WARNING, e.getMessage(), e);
     throw new SCTMException(
         MessageFormat.format(
             Messages.getString("SCTMService.err.commonFatalError"),
             e.getMessage())); // $NON-NLS-1$
   }
 }
Esempio n. 6
0
 private void logon() throws RemoteException {
   this.sessionId = this.systemService.logonUser(this.user, this.pwd);
   ;
   execService.setCurrentProject(sessionId, projectId);
   planningService.setCurrentProject(sessionId, String.valueOf(projectId));
 }