public class ServerCapabilitiesControl extends BackdoorControl<ServerCapabilitiesControl>
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
Constructor and Description |
---|
ServerCapabilitiesControl(BambooEnvironmentData environmentData) |
Modifier and Type | Method and Description |
---|---|
void |
createCapability(String key,
String value)
Create shared server capability
|
void |
createCommandExecutable(String name,
String path)
Convenience method for creating Command capability
|
void |
createGrailsExecutable(String name,
String path)
Convenience method for creating Grails capability
|
void |
deleteCapability(String capabilityKey)
Delete capability, will throw exception if REST endpoint returns an error (most probably capability doesn't exist)
|
void |
deleteCapabilityQuietly(String capabilityKey)
Delete capability, will throw exception if REST endpoint returns an error (most probably capability doesn't exist)
|
void |
detectServerCapabilities()
Call standard "Detect server capabilities" action.
|
List<RestCapability> |
getAllCapabilities()
Return full list of shared server capabilities
|
String |
getServerExecutable(String namePattern)
Get value of server executable capability
|
String |
gitPath() |
void |
redetectServerCapabilities()
Call REST endpoint defined in bamboo-test-utils-plugin.
|
boolean |
serverExecutableExists(String namePattern)
Check if given server executable capability exist
|
void |
tearDown()
Cleanup resources
|
client, createResource, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRoot
public ServerCapabilitiesControl(@NotNull BambooEnvironmentData environmentData)
public void detectServerCapabilities()
public void redetectServerCapabilities()
public void createCapability(@NotNull String key, @Nullable String value)
key
- capability keyvalue
- capability valuepublic void createGrailsExecutable(@NotNull String name, @Nullable String path)
name
- name of Grails executablepath
- path to Grails binarypublic void createCommandExecutable(@NotNull String name, @Nullable String path)
name
- name of Command executablepath
- path to Command binarypublic void deleteCapability(@NotNull String capabilityKey)
capabilityKey
- key of capability to be deletedpublic void deleteCapabilityQuietly(@NotNull String capabilityKey)
capabilityKey
- key of capability to be deletedpublic String gitPath()
public String getServerExecutable(@NotNull String namePattern)
namePattern
- pattern that should match server executable namepublic boolean serverExecutableExists(@NotNull String namePattern)
namePattern
- pattern that should match server executable namepublic List<RestCapability> getAllCapabilities()
public void tearDown()
BackdoorControl
tearDown
in class BackdoorControl<ServerCapabilitiesControl>
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.