Class TestDockerHandler
- java.lang.Object
-
- com.atlassian.bamboo.plugins.testutils.docker.TestDockerHandler
-
- All Implemented Interfaces:
DockerHandler
public class TestDockerHandler extends Object implements DockerHandler
-
-
Field Summary
Fields Modifier and Type Field Description static StringENABLED_KEYstatic StringPLUGIN_KEY
-
Constructor Summary
Constructors Constructor Description TestDockerHandler(BuildDefinition buildDefinition, EnvironmentCustomConfigService environmentCustomConfigService)TestDockerHandler(EnvironmentCustomConfigService environmentCustomConfigService)TestDockerHandler(Environment environment, EnvironmentCustomConfigService environmentCustomConfigService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendConfiguration(BuildConfiguration buildConfiguration, Map<String,Object> webFragmentsContextMap, boolean enabled)voiddisable(BuildDefinition buildDefinition, Job job)Called for Docker isolation options that were not selected in Job related UIs.voiddisable(Environment environment)Called for Docker isolation options that were not selected in Environment related UIs.voidenableAndUpdate(BuildDefinition buildDefinition, Job job, Map<String,Object> webFragmentsContextMap)Called for the selected Docker isolation option in Job related UIs.voidenableAndUpdate(Environment environment, Map<String,Object> webFragmentsContextMap)Called for the selected Docker isolation option in Environment related UIs.StringgetEditHtml()Renders the edit page.StringgetIsolationType()Identifier of Docker isolation type.StringgetViewHtml()Renders the view page.booleanisEnabled()Returns enablement state of the implementation.ErrorCollectionvalidateConfig(Map<String,Object> webFragmentsContextMap)Construct configuration from webFragmentContextMap and validate that the config is valid.
-
-
-
Field Detail
-
ENABLED_KEY
public static final String ENABLED_KEY
- See Also:
- Constant Field Values
-
PLUGIN_KEY
public static final String PLUGIN_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TestDockerHandler
public TestDockerHandler(BuildDefinition buildDefinition, EnvironmentCustomConfigService environmentCustomConfigService)
-
TestDockerHandler
public TestDockerHandler(Environment environment, EnvironmentCustomConfigService environmentCustomConfigService)
-
TestDockerHandler
public TestDockerHandler(EnvironmentCustomConfigService environmentCustomConfigService)
-
-
Method Detail
-
getEditHtml
public String getEditHtml()
Description copied from interface:DockerHandlerRenders the edit page.- Specified by:
getEditHtmlin interfaceDockerHandler
-
getViewHtml
public String getViewHtml()
Description copied from interface:DockerHandlerRenders the view page.- Specified by:
getViewHtmlin interfaceDockerHandler
-
isEnabled
public boolean isEnabled()
Description copied from interface:DockerHandlerReturns enablement state of the implementation. Typically either 0 or 1 of the implementations are enabled.- Specified by:
isEnabledin interfaceDockerHandler- Returns:
- true if enabled.
-
getIsolationType
public String getIsolationType()
Description copied from interface:DockerHandlerIdentifier of Docker isolation type.- Specified by:
getIsolationTypein interfaceDockerHandler- Returns:
-
validateConfig
public ErrorCollection validateConfig(Map<String,Object> webFragmentsContextMap)
Description copied from interface:DockerHandlerConstruct configuration from webFragmentContextMap and validate that the config is valid.- Specified by:
validateConfigin interfaceDockerHandler- Returns:
-
enableAndUpdate
public void enableAndUpdate(BuildDefinition buildDefinition, Job job, Map<String,Object> webFragmentsContextMap)
Description copied from interface:DockerHandlerCalled for the selected Docker isolation option in Job related UIs. The implementation is to construct the object from webFragmentsContextMap and store it in provided buildDefinition that is later stored by the infrastructure.- Specified by:
enableAndUpdatein interfaceDockerHandler
-
enableAndUpdate
public void enableAndUpdate(Environment environment, Map<String,Object> webFragmentsContextMap)
Description copied from interface:DockerHandlerCalled for the selected Docker isolation option in Environment related UIs. The implementation is to construct the object from webFragmentsContextMap and save the new values.- Specified by:
enableAndUpdatein interfaceDockerHandler
-
disable
public void disable(BuildDefinition buildDefinition, Job job)
Description copied from interface:DockerHandlerCalled for Docker isolation options that were not selected in Job related UIs. The implementation is to disable itself, perform cleanup of configuration in provided buildDefition object.- Specified by:
disablein interfaceDockerHandler
-
disable
public void disable(Environment environment)
Description copied from interface:DockerHandlerCalled for Docker isolation options that were not selected in Environment related UIs.- Specified by:
disablein interfaceDockerHandler
-
appendConfiguration
public void appendConfiguration(BuildConfiguration buildConfiguration, Map<String,Object> webFragmentsContextMap, boolean enabled)
- Specified by:
appendConfigurationin interfaceDockerHandler
-
-