public abstract class BasicAPICommand extends Object implements IAPICommand
Modifier and Type | Field and Description |
---|---|
protected com.mks.api.Command |
cmd |
protected Map<String,Object> |
commandHelperObjects |
protected static Logger |
LOGGER |
protected com.mks.api.response.Response |
res |
protected boolean |
runCommandWithInterim |
protected IntegrityConfigurable |
serverConfig |
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 and Description |
---|
BasicAPICommand() |
BasicAPICommand(IntegrityConfigurable serverConfig)
Constructor initialized with serverconfig id for commands to fire to a particular Integrity
server
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalParameters(String paramName,
Object param)
Objects required for command pre and post processing.
|
void |
addOption(IAPIOption option) |
void |
addSelection(String param) |
void |
doPostAction()
Do actions post the Integrity API call specifically for Jenkins functionality
|
void |
doPreAction()
Do actions pre the Integrity API call specifically for Jenkins functionality
|
com.mks.api.response.Response |
execute()
Default way to execute the command using an auto-generated Integrity Session API
|
com.mks.api.response.Response |
execute(ISession api)
Execute the command using Integrity Session API
|
void |
terminateAPI()
Function to explicitly terminate/return sessions to Session Pool for WITH_INTERIM commands
|
protected static final Logger LOGGER
protected com.mks.api.Command cmd
protected com.mks.api.response.Response res
protected boolean runCommandWithInterim
protected final IntegrityConfigurable serverConfig
public BasicAPICommand(IntegrityConfigurable serverConfig)
serverConfig
- public BasicAPICommand()
public com.mks.api.response.Response execute(ISession api) throws com.mks.api.response.APIException
IAPICommand
execute
in interface IAPICommand
com.mks.api.response.APIException
public com.mks.api.response.Response execute() throws com.mks.api.response.APIException, hudson.AbortException
IAPICommand
execute
in interface IAPICommand
hudson.AbortException
com.mks.api.response.APIException
public void addOption(IAPIOption option)
addOption
in interface IAPICommand
public void addSelection(String param)
addSelection
in interface IAPICommand
public void doPostAction()
IAPICommand
doPostAction
in interface IAPICommand
public void doPreAction()
IAPICommand
doPreAction
in interface IAPICommand
public void addAdditionalParameters(String paramName, Object param)
IAPICommand
addAdditionalParameters
in interface IAPICommand
public void terminateAPI() throws Exception
IAPICommand
terminateAPI
in interface IAPICommand
Exception
Copyright © 2016–2024. All rights reserved.