Package hudson.scm.api.command
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
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 Summary
FieldsModifier and TypeFieldDescriptionprotected com.mks.api.Commandprotected static final Loggerprotected com.mks.api.response.Responseprotected booleanprotected final IntegrityConfigurableFields inherited from interface hudson.scm.api.command.IAPICommand
ADD_PROJECT_LABEL_COMMAND, CHECKPOINT_COMMAND, CLOSE_CP_COMMAND, CREATE_CP_COMMAND, EDIT_ISSUE_COMMAND, EDIT_RESULT_COMMAND, ISSUES_COMMAND, LOCK_COMMAND, PROJECT_ADD_COMMAND, PROJECT_CHECKIN_COMMAND, PROJECT_CHECKOUT_COMMAND, PROJECT_CPDIFF_COMMAND, PROJECT_INFO_COMMAND, RELATIONSHIPS_COMMAND, REVISION_INFO_COMMAND, SUBMIT_CP_COMMAND, UNLOCK_COMMAND, VIEW_CP_COMMAND, VIEW_PROJECT_COMMAND -
Constructor Summary
ConstructorsConstructorDescriptionBasicAPICommand(IntegrityConfigurable serverConfig) Constructor initialized with serverconfig id for commands to fire to a particular Integrity server -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalParameters(String paramName, Object param) Objects required for command pre and post processing.voidaddOption(IAPIOption option) voidaddSelection(String param) voidDo actions post the Integrity API call specifically for Jenkins functionalityvoidDo actions pre the Integrity API call specifically for Jenkins functionalitycom.mks.api.response.Responseexecute()Default way to execute the command using an auto-generated Integrity Session APIcom.mks.api.response.ResponseExecute the command using Integrity Session APIvoidFunction to explicitly terminate/return sessions to Session Pool for WITH_INTERIM commands
-
Field Details
-
LOGGER
-
cmd
protected com.mks.api.Command cmd -
commandHelperObjects
-
res
protected com.mks.api.response.Response res -
runCommandWithInterim
protected boolean runCommandWithInterim -
serverConfig
-
-
Constructor Details
-
BasicAPICommand
Constructor initialized with serverconfig id for commands to fire to a particular Integrity server- Parameters:
serverConfig-
-
BasicAPICommand
public BasicAPICommand()
-
-
Method Details
-
execute
Description copied from interface:IAPICommandExecute the command using Integrity Session API- Specified by:
executein interfaceIAPICommand- Parameters:
api-- Throws:
com.mks.api.response.APIException
-
execute
public com.mks.api.response.Response execute() throws com.mks.api.response.APIException, hudson.AbortExceptionDescription copied from interface:IAPICommandDefault way to execute the command using an auto-generated Integrity Session API- Specified by:
executein interfaceIAPICommand- Returns:
- Throws:
com.mks.api.response.APIExceptionhudson.AbortException
-
addOption
- Specified by:
addOptionin interfaceIAPICommand- Parameters:
option-
-
addSelection
- Specified by:
addSelectionin interfaceIAPICommand- Parameters:
param-
-
doPostAction
public void doPostAction()Description copied from interface:IAPICommandDo actions post the Integrity API call specifically for Jenkins functionality- Specified by:
doPostActionin interfaceIAPICommand
-
doPreAction
public void doPreAction()Description copied from interface:IAPICommandDo actions pre the Integrity API call specifically for Jenkins functionality- Specified by:
doPreActionin interfaceIAPICommand
-
addAdditionalParameters
Description copied from interface:IAPICommandObjects required for command pre and post processing.- Specified by:
addAdditionalParametersin interfaceIAPICommand
-
terminateAPI
Description copied from interface:IAPICommandFunction to explicitly terminate/return sessions to Session Pool for WITH_INTERIM commands- Specified by:
terminateAPIin interfaceIAPICommand- Throws:
Exception
-