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 FileaddLogo()AdministrationControladdWebhookTemplate(@NotNull String name, @NotNull String payload, @NotNull String headers, @NotNull UUID uuid)AdministrationControlcreateGlobalVariable(@NotNull String key, @NotNull String value)protected com.sun.jersey.api.client.WebResourcecreateResource()Creates the resource that corresponds to the root of the TestKit REST API, using the values returned byBackdoorControl.getRestModulePath().AdministrationControlcreateTemporaryGlobalVariable(@NotNull String key, @NotNull String value)RestTrustedKeycreateTrustedSshKey(String host, String key)AdministrationControldeleteGlobalVariable(@NotNull String key)voiddeleteTrustedSshKey(@NotNull String host, @NotNull String key)Remove Trusted SSH keyAdministrationControldeleteWebhookTemplate(@NotNull UUID uuid)voiddisableAuditLog()voidenableAuditLog()@NotNull RestBuildConcurrencygetBuildConcurrencySettings()Returns current global build concurrency settings.intgetDashboardPageSize()@NotNull List<RestVariableDefinition>getGlobalVariables()RestSecuritySettingsgetSecuritySettings()RestStorageConfigurationgetStorageConfiguration()Map<String,String>getSystemInfo()List<RestTrustedKey>getTrustedSshKeys()booleanisAuditLogEnabled()LogSettingsControllogSettings()voidremoveMailServerSettings()voidsetAgentAssignmentModificationByUsersAllowed(boolean agentAssignmentModificationByUsersAllowed)voidsetBuildConcurrencySettings(boolean enabledBuildConcurrency, Integer defaultConcurrentBuilds)Sets current global build concurrency settings to the given primitives.voidsetBuildMonitoringSettings(int logQuietTime, int buildQueueTimeout)Sets plan monitoring settings for hung buildsvoidsetDashboardPageSize(int dashboardPageSize)voidsetGlobalExpiryConfiguration(@NotNull RestCombinedExpiryConfiguration configuration)Turn on instance expiration policy for build and deployment results.voidsetLicense(String license)voidsetMailServerSettings(@NotNull MailServerSettings mailServerSettings)voidsetManualEncryptionConfiguration(boolean enabled, int invocationLimit, TimeUnit invocationLimitUnit)voidsetRestrictedAdminRole(boolean enableRestrictedAdminRole)voidsetSecuritySettings(RestSecuritySettings settings)voidsetSoxComplianceModeEnabled(boolean enableSoxComplianceMode)AdministrationControlsetStorageConfiguration(RestStorageConfiguration storageConfiguration)voidtearDown()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:BackdoorControlCleanup resources- Overrides:
tearDownin classBackdoorControl<AdministrationControl>
-
createResource
protected com.sun.jersey.api.client.WebResource createResource()
Description copied from class:BackdoorControlCreates the resource that corresponds to the root of the TestKit REST API, using the values returned byBackdoorControl.getRestModulePath(). Note that the createdWebResourcehas the following properties:- it logs all GET/POST/etc requests made through it
- it sets the
Content-Type: application/jsonby default (override withWebResource.type(javax.ws.rs.core.MediaType))
BackdoorControl.createResourceForPath(java.lang.String)- Overrides:
createResourcein 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)
-
-