com.thalesgroup.hudson.plugins.clearcaserelease
Class ClearcaseReleaseAction

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.TaskAction
          extended by com.thalesgroup.hudson.plugins.clearcaserelease.ClearcaseReleaseAction
All Implemented Interfaces:
hudson.model.Action, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem
Direct Known Subclasses:
ClearcaseReleaseCancelAction, ClearcaseReleaseCompositeBaselineAction, ClearcaseReleaseLatestBaselineAction

public abstract class ClearcaseReleaseAction
extends hudson.model.TaskAction

Represents a clearcase action


Nested Class Summary
protected static class ClearcaseReleaseAction.BASELINE_PROMOTION_LEVEL
          The promotion level possibilities
 
Field Summary
protected  hudson.FilePath workspaceRoot
           
 
Fields inherited from class hudson.model.TaskAction
log, workerThread
 
Constructor Summary
protected ClearcaseReleaseAction(hudson.FilePath workapace)
           
 
Method Summary
protected  void changeLevelBaseline(java.lang.String baselineNameWithPVOB, java.lang.String status, hudson.plugins.clearcase.HudsonClearToolLauncher clearToolLauncher, hudson.FilePath filePath)
          Change the level of an UCM baseline (composite or not)
protected  java.lang.String chooseAction()
          Choose the page to display during the release processing
protected  void doIndex(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Select the view to display
protected  hudson.plugins.clearcase.HudsonClearToolLauncher getHudsonClearToolLauncher(hudson.model.TaskListener listener, hudson.Launcher launcher)
          Retieve the Clearcase launcher
protected  hudson.security.Permission getPermission()
          Defaults to SCM.TAG.
protected  java.lang.String getStatusBaseLine(java.lang.String baseLine, java.lang.String pvob, hudson.plugins.clearcase.HudsonClearToolLauncher clearToolLauncher, hudson.FilePath filePath)
          Get the status of a given UCM baseline
protected  boolean hasReleasePermission(hudson.model.AbstractProject job)
          Release actions is given by the SCM actions
 
Methods inherited from class hudson.model.TaskAction
doClearError, doProgressiveLog, getACL, getLog, getSearchUrl, getWorkerThread
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
 

Field Detail

workspaceRoot

protected final hudson.FilePath workspaceRoot
Constructor Detail

ClearcaseReleaseAction

protected ClearcaseReleaseAction(hudson.FilePath workapace)
Method Detail

getPermission

protected hudson.security.Permission getPermission()
Defaults to SCM.TAG.

Specified by:
getPermission in class hudson.model.TaskAction

getHudsonClearToolLauncher

protected hudson.plugins.clearcase.HudsonClearToolLauncher getHudsonClearToolLauncher(hudson.model.TaskListener listener,
                                                                                      hudson.Launcher launcher)
Retieve the Clearcase launcher

Parameters:
listener - the Hudson listener
launcher - the Hudson launcher
Returns:
the Clearcase launcher

hasReleasePermission

protected boolean hasReleasePermission(hudson.model.AbstractProject job)
Release actions is given by the SCM actions

Parameters:
job - the current project
Returns:
true if the BUILD permission is set

doIndex

protected void doIndex(org.kohsuke.stapler.StaplerRequest req,
                       org.kohsuke.stapler.StaplerResponse rsp)
                throws java.io.IOException,
                       javax.servlet.ServletException
Select the view to display

Parameters:
req - the request object
rsp - the response page
Throws:
java.io.IOException
javax.servlet.ServletException

chooseAction

protected java.lang.String chooseAction()
Choose the page to display during the release processing

Returns:
the displayed page

getStatusBaseLine

protected java.lang.String getStatusBaseLine(java.lang.String baseLine,
                                             java.lang.String pvob,
                                             hudson.plugins.clearcase.HudsonClearToolLauncher clearToolLauncher,
                                             hudson.FilePath filePath)
                                      throws java.io.IOException,
                                             java.lang.InterruptedException
Get the status of a given UCM baseline

Parameters:
baseLine - the UCM baseline
pvob - the UCM P_VOB
clearToolLauncher - : the clearcase object for launching commands
filePath - the location where to launch the clearcase command
Returns:
the baseline status : INITIAL, BUILT, REJECTED, RELEASED or OTHERS
Throws:
java.io.IOException
java.lang.InterruptedException

changeLevelBaseline

protected void changeLevelBaseline(java.lang.String baselineNameWithPVOB,
                                   java.lang.String status,
                                   hudson.plugins.clearcase.HudsonClearToolLauncher clearToolLauncher,
                                   hudson.FilePath filePath)
                            throws java.lang.InterruptedException,
                                   java.io.IOException
Change the level of an UCM baseline (composite or not)

Parameters:
baselineNameWithPVOB - the given baseline with the P_VOB
status - the new baseline status
clearToolLauncher - the clearcase object launcher
filePath - the location where to launch the clearcase coommand
Throws:
java.lang.InterruptedException
java.io.IOException


Copyright © 2009. All Rights Reserved.