Class AdministrationControl
- java.lang.Object
-
- com.atlassian.bamboo.testutils.backdoor.BackdoorControl<AdministrationControl>
-
- com.atlassian.bamboo.testutils.backdoor.AdministrationControl
-
public class AdministrationControl extends BackdoorControl<AdministrationControl>
-
-
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 AdministrationControl(@NotNull BambooEnvironmentData environmentData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
addLogo()
AdministrationControl
addWebhookTemplate(@NotNull String name, @NotNull String payload, @NotNull String headers, @NotNull UUID uuid)
AdministrationControl
createGlobalVariable(@NotNull String key, @NotNull String value)
protected com.sun.jersey.api.client.WebResource
createResource()
Creates the resource that corresponds to the root of the TestKit REST API, using the values returned byBackdoorControl.getRestModulePath()
.AdministrationControl
createTemporaryGlobalVariable(@NotNull String key, @NotNull String value)
RestTrustedKey
createTrustedSshKey(String host, String key)
AdministrationControl
deleteGlobalVariable(@NotNull String key)
void
deleteTrustedSshKey(@NotNull String host, @NotNull String key)
Remove Trusted SSH keyAdministrationControl
deleteWebhookTemplate(@NotNull UUID uuid)
void
disableAuditLog()
void
enableAuditLog()
@NotNull RestBuildConcurrency
getBuildConcurrencySettings()
Returns current global build concurrency settings.int
getDashboardPageSize()
@NotNull List<RestVariableDefinition>
getGlobalVariables()
RestSecuritySettings
getSecuritySettings()
RestStorageConfiguration
getStorageConfiguration()
Map<String,String>
getSystemInfo()
List<RestTrustedKey>
getTrustedSshKeys()
boolean
isAuditLogEnabled()
LogSettingsControl
logSettings()
void
removeMailServerSettings()
void
setAgentAssignmentModificationByUsersAllowed(boolean agentAssignmentModificationByUsersAllowed)
void
setBuildConcurrencySettings(boolean enabledBuildConcurrency, Integer defaultConcurrentBuilds)
Sets current global build concurrency settings to the given primitives.void
setBuildMonitoringSettings(int logQuietTime, int buildQueueTimeout)
Sets plan monitoring settings for hung buildsvoid
setDashboardPageSize(int dashboardPageSize)
void
setGlobalExpiryConfiguration(@NotNull RestCombinedExpiryConfiguration configuration)
Turn on instance expiration policy for build and deployment results.void
setLicense(String license)
void
setMailServerSettings(@NotNull MailServerSettings mailServerSettings)
void
setManualEncryptionConfiguration(boolean enabled, int invocationLimit, TimeUnit invocationLimitUnit)
void
setRestrictedAdminRole(boolean enableRestrictedAdminRole)
void
setSecuritySettings(RestSecuritySettings settings)
void
setSoxComplianceModeEnabled(boolean enableSoxComplianceMode)
AdministrationControl
setStorageConfiguration(RestStorageConfiguration storageConfiguration)
void
tearDown()
Cleanup resources-
Methods inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
client, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRoot
-
-
-
-
Constructor Detail
-
AdministrationControl
public AdministrationControl(@NotNull @NotNull BambooEnvironmentData environmentData)
-
-
Method Detail
-
tearDown
public void tearDown()
Description copied from class:BackdoorControl
Cleanup resources- Overrides:
tearDown
in classBackdoorControl<AdministrationControl>
-
createResource
protected com.sun.jersey.api.client.WebResource createResource()
Description copied from class:BackdoorControl
Creates the resource that corresponds to the root of the TestKit REST API, using the values returned byBackdoorControl.getRestModulePath()
. Note that the createdWebResource
has the following properties:- it logs all GET/POST/etc requests made through it
- it sets the
Content-Type: application/json
by default (override withWebResource.type(javax.ws.rs.core.MediaType)
)
BackdoorControl.createResourceForPath(java.lang.String)
- Overrides:
createResource
in classBackdoorControl<AdministrationControl>
- Returns:
- a WebResource for the TestKit REST API root
- See Also:
BackdoorControl.createResource()
,BackdoorControl.getRestModulePath()
-
logSettings
public LogSettingsControl logSettings()
-
isAuditLogEnabled
public boolean isAuditLogEnabled()
-
getDashboardPageSize
public int getDashboardPageSize()
-
setDashboardPageSize
public void setDashboardPageSize(int dashboardPageSize)
-
createGlobalVariable
public AdministrationControl createGlobalVariable(@NotNull @NotNull String key, @NotNull @NotNull String value)
-
addWebhookTemplate
public AdministrationControl addWebhookTemplate(@NotNull @NotNull String name, @NotNull @NotNull String payload, @NotNull @NotNull String headers, @NotNull @NotNull UUID uuid)
-
deleteWebhookTemplate
public AdministrationControl deleteWebhookTemplate(@NotNull @NotNull UUID uuid)
-
deleteGlobalVariable
public AdministrationControl deleteGlobalVariable(@NotNull @NotNull String key)
-
createTemporaryGlobalVariable
public AdministrationControl createTemporaryGlobalVariable(@NotNull @NotNull String key, @NotNull @NotNull String value)
-
getGlobalVariables
@NotNull public @NotNull List<RestVariableDefinition> getGlobalVariables()
-
setStorageConfiguration
public AdministrationControl setStorageConfiguration(RestStorageConfiguration storageConfiguration)
-
getStorageConfiguration
public RestStorageConfiguration getStorageConfiguration()
-
getSecuritySettings
public RestSecuritySettings getSecuritySettings()
-
setSecuritySettings
public void setSecuritySettings(RestSecuritySettings settings)
-
setRestrictedAdminRole
public void setRestrictedAdminRole(boolean enableRestrictedAdminRole)
-
setSoxComplianceModeEnabled
public void setSoxComplianceModeEnabled(boolean enableSoxComplianceMode)
-
setAgentAssignmentModificationByUsersAllowed
public void setAgentAssignmentModificationByUsersAllowed(boolean agentAssignmentModificationByUsersAllowed)
-
setMailServerSettings
public void setMailServerSettings(@NotNull @NotNull MailServerSettings mailServerSettings)
-
removeMailServerSettings
public void removeMailServerSettings()
-
getBuildConcurrencySettings
@NotNull public @NotNull RestBuildConcurrency getBuildConcurrencySettings() throws Exception
Returns current global build concurrency settings. Requires experimental REST admin API to be enabled.- Throws:
Exception
-
createTrustedSshKey
public RestTrustedKey createTrustedSshKey(String host, String key) throws Exception
- Throws:
Exception
-
getTrustedSshKeys
public List<RestTrustedKey> getTrustedSshKeys()
-
deleteTrustedSshKey
public void deleteTrustedSshKey(@NotNull @NotNull String host, @NotNull @NotNull String key)
Remove Trusted SSH key- Parameters:
host
-key
-
-
setBuildConcurrencySettings
public void setBuildConcurrencySettings(boolean enabledBuildConcurrency, Integer defaultConcurrentBuilds)
Sets current global build concurrency settings to the given primitives. Requires experimental REST admin API to be enabled.
-
setBuildMonitoringSettings
public void setBuildMonitoringSettings(int logQuietTime, int buildQueueTimeout)
Sets plan monitoring settings for hung builds- Parameters:
logQuietTime
- minutesbuildQueueTimeout
- minutes
-
setLicense
public void setLicense(String license)
-
setGlobalExpiryConfiguration
public void setGlobalExpiryConfiguration(@NotNull @NotNull RestCombinedExpiryConfiguration configuration)
Turn on instance expiration policy for build and deployment results.
-
setManualEncryptionConfiguration
public void setManualEncryptionConfiguration(boolean enabled, int invocationLimit, TimeUnit invocationLimitUnit)
-
-