Class InternalEnvironmentImpl
- java.lang.Object
-
- com.atlassian.bamboo.deployments.environments.persistence.internal.InternalEnvironmentImpl
-
- All Implemented Interfaces:
BambooIdProvider
,InternalEnvironment
,TaskContainer
,Triggerable
,DescriptionProvider
,NameProvider
- Direct Known Subclasses:
InternalEnvironmentStubImpl
@Internal public class InternalEnvironmentImpl extends Object implements InternalEnvironment
Minimal, user context agnostic, but fully functional implementation ofInternalEnvironment
, used when processing deployment environments en masse.
-
-
Constructor Summary
Constructors Modifier Constructor Description InternalEnvironmentImpl(long id, long deploymentProjectId, String name, String description, String tasksXmlData, String triggersXmlData, int position, ConfigurationState configurationState, long requirementSetId, ReleaseApprovalPrerequisite releaseApprovalPrerequisite)
protected
InternalEnvironmentImpl(@NotNull InternalEnvironment other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurationState
getConfigurationState()
long
getDeploymentProjectId()
@Nullable String
getDescription()
long
getId()
@NotNull DeploymentKey
getKey()
Key representing this environment.@NotNull String
getName()
int
getPosition()
@NotNull ReleaseApprovalPrerequisite
getReleaseApprovalPrerequisite()
@NotNull ImmutableRequirementSet
getRequirementSet()
Return effective value ofImmutableRequirementSet
, that is value that is considered when checking which agents and elastic images can deploy to this environment.@NotNull Supplier<ImmutableRequirementSet>
getRequirementSetSupplier()
Return (possibly lazy) supplier of the requirement set.@NotNull List<TaskDefinition>
getTaskDefinitions()
@NotNull Supplier<List<TaskDefinition>>
getTaskDefinitionsSupplier()
Return (possibly lazy) supplier of tasks.@NotNull List<TriggerDefinition>
getTriggerDefinitions()
@NotNull Supplier<List<TriggerDefinition>>
getTriggerDefinitionsSupplier()
Return (possibly lazy) supplier of triggers.boolean
isSuspended()
-
-
-
Constructor Detail
-
InternalEnvironmentImpl
public InternalEnvironmentImpl(long id, long deploymentProjectId, String name, String description, String tasksXmlData, String triggersXmlData, int position, ConfigurationState configurationState, long requirementSetId, ReleaseApprovalPrerequisite releaseApprovalPrerequisite)
-
InternalEnvironmentImpl
protected InternalEnvironmentImpl(@NotNull @NotNull InternalEnvironment other)
-
-
Method Detail
-
getTaskDefinitions
@NotNull public @NotNull List<TaskDefinition> getTaskDefinitions()
- Specified by:
getTaskDefinitions
in interfaceTaskContainer
- Returns:
- an ordered list of taskDefinitions for this container.
-
isSuspended
public boolean isSuspended()
- Specified by:
isSuspended
in interfaceTriggerable
- Returns:
- true if automatic triggering is switched off for this object
-
getTriggerDefinitions
@NotNull public @NotNull List<TriggerDefinition> getTriggerDefinitions()
- Specified by:
getTriggerDefinitions
in interfaceTriggerable
- Returns:
- immutable list of all triggers defined for this object
-
getId
public long getId()
- Specified by:
getId
in interfaceBambooIdProvider
- Specified by:
getId
in interfaceInternalEnvironment
- Returns:
- unique identifier (in this case from database)
-
getKey
@NotNull public @NotNull DeploymentKey getKey()
Description copied from interface:InternalEnvironment
Key representing this environment. Keys have much less significance in deployments than in plans. Please consider usingInternalEnvironment.getId()
instead.- Specified by:
getKey
in interfaceInternalEnvironment
- Returns:
- key of this environment.
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getName
in interfaceDescriptionProvider
- Specified by:
getName
in interfaceInternalEnvironment
- Specified by:
getName
in interfaceNameProvider
- Returns:
- User friendly shortish name for this environment. Must be unique within a deployment project
-
getDescription
@Nullable public @Nullable String getDescription()
- Specified by:
getDescription
in interfaceDescriptionProvider
- Specified by:
getDescription
in interfaceInternalEnvironment
- Returns:
- Optional, longer description of the environment
-
getDeploymentProjectId
public long getDeploymentProjectId()
- Specified by:
getDeploymentProjectId
in interfaceInternalEnvironment
- Returns:
- id of the
DeploymentProject
which is owner of this environment
-
getConfigurationState
public ConfigurationState getConfigurationState()
- Specified by:
getConfigurationState
in interfaceInternalEnvironment
- Returns:
- Enum representing how completed the configuration of this environments is.
-
getPosition
public int getPosition()
- Specified by:
getPosition
in interfaceInternalEnvironment
- Returns:
- position of this environment in deployment project's environment list.
-
getRequirementSet
@NotNull public @NotNull ImmutableRequirementSet getRequirementSet()
Description copied from interface:InternalEnvironment
Return effective value ofImmutableRequirementSet
, that is value that is considered when checking which agents and elastic images can deploy to this environment.- Specified by:
getRequirementSet
in interfaceInternalEnvironment
-
getTaskDefinitionsSupplier
@NotNull public @NotNull Supplier<List<TaskDefinition>> getTaskDefinitionsSupplier()
Description copied from interface:InternalEnvironment
Return (possibly lazy) supplier of tasks.- Specified by:
getTaskDefinitionsSupplier
in interfaceInternalEnvironment
-
getTriggerDefinitionsSupplier
@NotNull public @NotNull Supplier<List<TriggerDefinition>> getTriggerDefinitionsSupplier()
Description copied from interface:InternalEnvironment
Return (possibly lazy) supplier of triggers.- Specified by:
getTriggerDefinitionsSupplier
in interfaceInternalEnvironment
-
getRequirementSetSupplier
@NotNull public @NotNull Supplier<ImmutableRequirementSet> getRequirementSetSupplier()
Description copied from interface:InternalEnvironment
Return (possibly lazy) supplier of the requirement set.- Specified by:
getRequirementSetSupplier
in interfaceInternalEnvironment
-
getReleaseApprovalPrerequisite
@NotNull public @NotNull ReleaseApprovalPrerequisite getReleaseApprovalPrerequisite()
- Specified by:
getReleaseApprovalPrerequisite
in interfaceInternalEnvironment
-
-