public interface EnvironmentDao
Modifier and Type | Method and Description |
---|---|
long |
countAll() |
@NotNull MutableEnvironment |
createNewEnvironmentInstance() |
void |
delete(@NotNull MutableEnvironment environment)
Delete a specific Deployment Environment.
|
List<MutableEnvironment> |
findAll() |
@NotNull List<? extends MutableEnvironment> |
findAll(int firstResult,
int pageSize) |
List<MutableEnvironment> |
findAllByIds(Collection<Long> ids)
Returns a list of Environments which id values are in the ids collection
|
@NotNull List<EnvironmentStub> |
findAllStubs(int firstResult,
int pageSize) |
@Nullable MutableEnvironment |
findEnvironmentByName(long deploymentProjectId,
String name)
Find environment with specified name in a deployment project
|
@NotNull List<Pair<Requirement,MutableEnvironment>> |
findEnvironmentsByRequirementKey(@NotNull String requirementKey)
Get requirements to environment mapping by requirement key.
|
@Nullable MutableEnvironment |
getEnvironment(@NotNull DeploymentKey environmentKey)
Gets specific Environment by key
|
@Nullable MutableEnvironment |
getEnvironment(long environmentId)
Gets specific Environment by ID
|
int |
getEnvironmentCount() |
int |
getEnvironmentCountForProject(long deploymentProjectId) |
@NotNull List<MutableEnvironment> |
getEnvironmentsForDeploymentProject(long deploymentProjectId)
Retrieve all environments for a Deployment Project
|
@NotNull List<EnvironmentStub> |
getEnvironmentStubsForDeploymentProject(long deploymentProjectId)
Retrieve all environment stubs for a Deployment Project.
|
int |
getFirstEnvironmentPosition(long deploymentProjectId) |
int |
getLastEnvironmentPosition(long deploymentProjectId) |
Optional<MutableEnvironment> |
getNextEnvironment(long deploymentProjectId,
int position) |
List<EnvironmentWithProjectAndRequirementsDto> |
getPaginatedDeploymentsWithEnvironmentsOnlyIdsAndRequirementSets(int start,
int limit,
String filter)
Retrieve paginated pairs of deployment project and environment ids together with the environment
requirements, sorted by project ids and environment positions, matching the filter string anywhere
within the name of the project or environment
|
@NotNull List<MutableEnvironment> |
getPaginatedEnvironmentsForDeploymentProject(long deploymentProjectId,
int start,
int limit,
String filter)
Retrieve part of environments for a Deployment Project ordered by position
|
Optional<MutableEnvironment> |
getPreviousEnvironment(long deploymentProjectId,
int position) |
boolean |
isEnvironmentNameConflicting(@NotNull MutableDeploymentProject deploymentProject,
@NotNull String name)
Check if there is currently an environment with the given name in the given deployment Project.
|
void |
save(@NotNull MutableEnvironment environment)
Save a new or existing environment.
|
<E extends MutableEnvironment> |
saveAll(@NotNull Collection<E> environments)
Save all items on the list;
|
void |
shiftDownEnvPosition(int fromPosition,
int toPosition,
long deploymentProjectId)
Decrement by one all environments positions for given deployment project for environments which have position greater than
fromPosition and lower than toPosition.
|
void |
shiftUpEnvPosition(int fromPosition,
int toPosition,
long deploymentProjectId)
Increment by one all environments positions for given deployment project for environments which have position greater than
fromPosition and lower than toPosition.
|
@Nullable @Nullable MutableEnvironment getEnvironment(long environmentId)
environmentId
- ID of the environment your looking for.@Nullable @Nullable MutableEnvironment getEnvironment(@NotNull @NotNull DeploymentKey environmentKey)
environmentKey
- ket of the environment to findvoid save(@NotNull @NotNull MutableEnvironment environment)
environment
- to save.<E extends MutableEnvironment> void saveAll(@NotNull @NotNull Collection<E> environments)
environments
- @NotNull @NotNull List<MutableEnvironment> getEnvironmentsForDeploymentProject(long deploymentProjectId)
deploymentProjectId
- of the Deployment Projectvoid delete(@NotNull @NotNull MutableEnvironment environment)
environment
- @NotNull @NotNull List<EnvironmentStub> getEnvironmentStubsForDeploymentProject(long deploymentProjectId)
deploymentProjectId
- of the Deployment Projectboolean isEnvironmentNameConflicting(@NotNull @NotNull MutableDeploymentProject deploymentProject, @NotNull @NotNull String name)
deploymentProject
- the project to check environments ofname
- to check for conflictList<MutableEnvironment> findAll()
int getLastEnvironmentPosition(long deploymentProjectId)
int getFirstEnvironmentPosition(long deploymentProjectId)
int getEnvironmentCount()
Environment
sint getEnvironmentCountForProject(long deploymentProjectId)
deploymentProjectId
- Environment
defined for the projectlong countAll()
@NotNull @NotNull List<? extends MutableEnvironment> findAll(int firstResult, int pageSize)
@NotNull @NotNull List<EnvironmentStub> findAllStubs(int firstResult, int pageSize)
@NotNull @NotNull List<Pair<Requirement,MutableEnvironment>> findEnvironmentsByRequirementKey(@NotNull @NotNull String requirementKey)
requirementKey
- on which environments rely@NotNull @NotNull MutableEnvironment createNewEnvironmentInstance()
@Nullable @Nullable MutableEnvironment findEnvironmentByName(long deploymentProjectId, String name)
deploymentProjectId
- name
- @NotNull @NotNull List<MutableEnvironment> getPaginatedEnvironmentsForDeploymentProject(long deploymentProjectId, int start, int limit, String filter)
start
- startlimit
- max size of resultdeploymentProjectId
- of the Deployment ProjectList<EnvironmentWithProjectAndRequirementsDto> getPaginatedDeploymentsWithEnvironmentsOnlyIdsAndRequirementSets(int start, int limit, String filter)
start
- startlimit
- max size of resultfilter
- string by which the names of project and environments will be filteredvoid shiftUpEnvPosition(int fromPosition, int toPosition, long deploymentProjectId)
fromPosition
- toPosition
- deploymentProjectId
- void shiftDownEnvPosition(int fromPosition, int toPosition, long deploymentProjectId)
fromPosition
- toPosition
- deploymentProjectId
- Optional<MutableEnvironment> getNextEnvironment(long deploymentProjectId, int position)
deploymentProjectId
- position
- MutableEnvironment
in deploymentProject which has greater position than positionOptional<MutableEnvironment> getPreviousEnvironment(long deploymentProjectId, int position)
deploymentProjectId
- position
- MutableEnvironment
in deploymentProject which has lower position than positionList<MutableEnvironment> findAllByIds(Collection<Long> ids)
ids
- list of id valuesCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.