Class ServerCapabilitiesControl
- java.lang.Object
-
- com.atlassian.bamboo.testutils.backdoor.BackdoorControl<ServerCapabilitiesControl>
-
- com.atlassian.bamboo.testutils.backdoor.ServerCapabilitiesControl
-
public class ServerCapabilitiesControl extends BackdoorControl<ServerCapabilitiesControl>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
-
-
Constructor Summary
Constructors Constructor Description ServerCapabilitiesControl(@NotNull BambooEnvironmentData environmentData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createCapability(@NotNull String key, @Nullable String value)
Create shared server capabilityvoid
createCommandExecutable(@NotNull String name, @Nullable String path)
Convenience method for creating Command capabilityvoid
createGrailsExecutable(@NotNull String name, @Nullable String path)
Convenience method for creating Grails capabilityvoid
createJdkCapability(@NotNull String name, @Nullable String path)
Create JDK capability.void
deleteCapability(@NotNull String capabilityKey)
Delete capability, will throw exception if REST endpoint returns an error (most probably capability doesn't exist)void
deleteCapabilityQuietly(@NotNull 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 capabilitiesString
getServerExecutable(@NotNull String namePattern)
Get value of server executable capabilityString
gitPath()
boolean
jdkExists(@NotNull String jdkLabel)
Check if given JDK capability existsvoid
redetectServerCapabilities()
Call REST endpoint defined in bamboo-test-utils-plugin.boolean
serverExecutableExists(@NotNull String namePattern)
Check if given server executable capability existvoid
tearDown()
Cleanup resources-
Methods inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
client, createResource, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRoot
-
-
-
-
Constructor Detail
-
ServerCapabilitiesControl
public ServerCapabilitiesControl(@NotNull @NotNull BambooEnvironmentData environmentData)
-
-
Method Detail
-
detectServerCapabilities
public void detectServerCapabilities()
Call standard "Detect server capabilities" action. Will update existing configuration.
-
redetectServerCapabilities
public void redetectServerCapabilities()
Call REST endpoint defined in bamboo-test-utils-plugin. Will remove existing capabilities and detect them again.
-
createCapability
public void createCapability(@NotNull @NotNull String key, @Nullable @Nullable String value)
Create shared server capability- Parameters:
key
- capability keyvalue
- capability value
-
createGrailsExecutable
public void createGrailsExecutable(@NotNull @NotNull String name, @Nullable @Nullable String path)
Convenience method for creating Grails capability- Parameters:
name
- name of Grails executablepath
- path to Grails binary
-
createJdkCapability
public void createJdkCapability(@NotNull @NotNull String name, @Nullable @Nullable String path)
Create JDK capability.
-
createCommandExecutable
public void createCommandExecutable(@NotNull @NotNull String name, @Nullable @Nullable String path)
Convenience method for creating Command capability- Parameters:
name
- name of Command executablepath
- path to Command binary
-
deleteCapability
public void deleteCapability(@NotNull @NotNull String capabilityKey)
Delete capability, will throw exception if REST endpoint returns an error (most probably capability doesn't exist)- Parameters:
capabilityKey
- key of capability to be deleted
-
deleteCapabilityQuietly
public void deleteCapabilityQuietly(@NotNull @NotNull String capabilityKey)
Delete capability, will throw exception if REST endpoint returns an error (most probably capability doesn't exist)- Parameters:
capabilityKey
- key of capability to be deleted
-
gitPath
public String gitPath()
-
getServerExecutable
public String getServerExecutable(@NotNull @NotNull String namePattern)
Get value of server executable capability- Parameters:
namePattern
- pattern that should match server executable name
-
serverExecutableExists
public boolean serverExecutableExists(@NotNull @NotNull String namePattern)
Check if given server executable capability exist- Parameters:
namePattern
- pattern that should match server executable name
-
jdkExists
public boolean jdkExists(@NotNull @NotNull String jdkLabel)
Check if given JDK capability exists
-
getAllCapabilities
public List<RestCapability> getAllCapabilities()
Return full list of shared server capabilities
-
tearDown
public void tearDown()
Description copied from class:BackdoorControl
Cleanup resources- Overrides:
tearDown
in classBackdoorControl<ServerCapabilitiesControl>
-
-