Class BasicAPICommand

java.lang.Object
hudson.scm.api.command.BasicAPICommand
All Implemented Interfaces:
IAPICommand
Direct Known Subclasses:
AddProjectLabelCommand, CheckPointCommand, CloseCPCommand, CreateCPCommand, EditIssuesCommand, EditResultsCommand, IssuesCommand, LockCommand, ProjectAddCommand, ProjectCheckinCommand, ProjectCheckoutCommand, ProjectCPDiffCommand, ProjectInfoCommand, RelationshipsCommand, RevisionInfoCommand, SubmitCPCommand, UnlockCommand, ViewCPCommand, ViewProjectCommand

public abstract class BasicAPICommand extends Object implements IAPICommand
All Jenkins Integrity API Commands have to extend this class in order to execute Integrity API calls using the default method
Version:
$Revision: $
Author:
Author: asen
  • Field Details

    • LOGGER

      protected static final Logger LOGGER
    • cmd

      protected com.mks.api.Command cmd
    • commandHelperObjects

      protected Map<String,Object> commandHelperObjects
    • res

      protected com.mks.api.response.Response res
    • runCommandWithInterim

      protected boolean runCommandWithInterim
    • serverConfig

      protected final IntegrityConfigurable serverConfig
  • Constructor Details

    • BasicAPICommand

      public BasicAPICommand(IntegrityConfigurable serverConfig)
      Constructor initialized with serverconfig id for commands to fire to a particular Integrity server
      Parameters:
      serverConfig -
    • BasicAPICommand

      public BasicAPICommand()
  • Method Details

    • execute

      public com.mks.api.response.Response execute(ISession api) throws com.mks.api.response.APIException
      Description copied from interface: IAPICommand
      Execute the command using Integrity Session API
      Specified by:
      execute in interface IAPICommand
      Parameters:
      api -
      Throws:
      com.mks.api.response.APIException
    • execute

      public com.mks.api.response.Response execute() throws com.mks.api.response.APIException, hudson.AbortException
      Description copied from interface: IAPICommand
      Default way to execute the command using an auto-generated Integrity Session API
      Specified by:
      execute in interface IAPICommand
      Returns:
      Throws:
      com.mks.api.response.APIException
      hudson.AbortException
    • addOption

      public void addOption(IAPIOption option)
      Specified by:
      addOption in interface IAPICommand
      Parameters:
      option -
    • addSelection

      public void addSelection(String param)
      Specified by:
      addSelection in interface IAPICommand
      Parameters:
      param -
    • doPostAction

      public void doPostAction()
      Description copied from interface: IAPICommand
      Do actions post the Integrity API call specifically for Jenkins functionality
      Specified by:
      doPostAction in interface IAPICommand
    • doPreAction

      public void doPreAction()
      Description copied from interface: IAPICommand
      Do actions pre the Integrity API call specifically for Jenkins functionality
      Specified by:
      doPreAction in interface IAPICommand
    • addAdditionalParameters

      public void addAdditionalParameters(String paramName, Object param)
      Description copied from interface: IAPICommand
      Objects required for command pre and post processing.
      Specified by:
      addAdditionalParameters in interface IAPICommand
    • terminateAPI

      public void terminateAPI() throws Exception
      Description copied from interface: IAPICommand
      Function to explicitly terminate/return sessions to Session Pool for WITH_INTERIM commands
      Specified by:
      terminateAPI in interface IAPICommand
      Throws:
      Exception