com.atlassian.bamboo.deployments.environments
Class EnvironmentImpl

java.lang.Object
  extended by com.atlassian.bamboo.deployments.environments.EnvironmentImpl
All Implemented Interfaces:
BambooIdProvider, Environment, InternalEnvironment, Triggerable, DescriptionProvider, NameProvider

public class EnvironmentImpl
extends Object
implements Environment


Constructor Summary
EnvironmentImpl(Environment environment, Operations operations)
           
EnvironmentImpl(MutableEnvironment mutableEnvironment)
           
 
Method Summary
 ConfigurationState getConfigurationState()
           
 long getDeploymentProjectId()
           
 String getDescription()
           
 long getId()
           
 DeploymentKey getKey()
          Key representing this environment.
 String getName()
           
 Operations getOperations()
          Operations object describing detailed permissions for environment
 int getPosition()
           
 List<TaskDefinition> getTaskDefinitions()
           
 List<TriggerDefinition> getTriggerDefinitions()
           
 List<BuildStrategy> getTriggers()
          Returns triggers defined for this object as BuildStrategies.
 boolean isSuspended()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentImpl

public EnvironmentImpl(MutableEnvironment mutableEnvironment)

EnvironmentImpl

public EnvironmentImpl(Environment environment,
                       Operations operations)
Method Detail

getId

public long getId()
Specified by:
getId in interface BambooIdProvider
Specified by:
getId in interface InternalEnvironment
Returns:
unique identifier (in this case from database)

getName

@NotNull
public String getName()
Specified by:
getName in interface InternalEnvironment
Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider
Returns:
User friendly shortish name for this environment. Must be unique within a deployment project

getDescription

public String getDescription()
Specified by:
getDescription in interface InternalEnvironment
Specified by:
getDescription in interface DescriptionProvider
Returns:
Optional, longer description of the environment

getKey

@NotNull
public DeploymentKey getKey()
Description copied from interface: InternalEnvironment
Key representing this environment. Keys have much less significance in deployments than in plans. Please consider using InternalEnvironment.getId() instead.

Specified by:
getKey in interface InternalEnvironment
Returns:
key of this environment.

getConfigurationState

public ConfigurationState getConfigurationState()
Specified by:
getConfigurationState in interface InternalEnvironment
Returns:
Enum representing how completed the configuration of this environments is.

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface Triggerable
Returns:
true iff automatic triggering is switched off for this object

getTaskDefinitions

@NotNull
public List<TaskDefinition> getTaskDefinitions()
Specified by:
getTaskDefinitions in interface Environment
Returns:
an ordered list of taskDefinitions for this environment.

getTriggerDefinitions

@NotNull
public List<TriggerDefinition> getTriggerDefinitions()
Specified by:
getTriggerDefinitions in interface Triggerable
Returns:
immutable list of all triggers defined for this object

getTriggers

@NotNull
public List<BuildStrategy> getTriggers()
Description copied from interface: Triggerable
Returns triggers defined for this object as BuildStrategies. The result of this function is produced by calling Triggerable.getTriggerDefinitions() and converting its results. Note that this conversion can be lossy, as not all trigger types are convertible to BuildStrategies. Items that cannot be converted are skipped.

Specified by:
getTriggers in interface Triggerable
Returns:
triggers defined for this object.

getDeploymentProjectId

public long getDeploymentProjectId()
Specified by:
getDeploymentProjectId in interface InternalEnvironment
Returns:
id of the DeploymentProject which is owner of this environment

getOperations

public Operations getOperations()
Description copied from interface: Environment
Operations object describing detailed permissions for environment

Specified by:
getOperations in interface Environment
Returns:

getPosition

public int getPosition()
Specified by:
getPosition in interface InternalEnvironment
Returns:
position of this environment in deployment project's environment list.


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.