public interface EnvironmentDao
Modifier and Type | Method and Description |
---|---|
long |
countAll() |
MutableEnvironment |
createNewEnvironmentInstance() |
void |
delete(MutableEnvironment environment)
Delete a specific Deployment Environment.
|
List<MutableEnvironment> |
findAll() |
List<? extends MutableEnvironment> |
findAll(int firstResult,
int pageSize) |
MutableEnvironment |
findEnvironmentByName(long deploymentProjectId,
String name)
Find environment with specified name in a deployment project
|
List<Pair<Requirement,MutableEnvironment>> |
findEnvironmentsByRequirementKey(String requirementKey)
Get requirements to environment mapping by requirement key.
|
MutableEnvironment |
getEnvironment(DeploymentKey environmentKey)
Gets specific Environment by key
|
MutableEnvironment |
getEnvironment(long environmentId)
Gets specific Environment by ID
|
int |
getEnvironmentCount() |
int |
getEnvironmentCountForProject(long deploymentProjectId) |
List<MutableEnvironment> |
getEnvironmentsForDeploymentProject(long deploymentProjectId)
Retrieve all environments for a Deployment Project
|
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<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(MutableDeploymentProject deploymentProject,
String name)
Check if there is currently an environment with the given name in the given deployment Project.
|
void |
save(MutableEnvironment environment)
Save a new or existing environment.
|
<E extends MutableEnvironment> |
saveAll(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 MutableEnvironment getEnvironment(long environmentId)
environmentId
- ID of the environment your looking for.@Nullable MutableEnvironment getEnvironment(@NotNull DeploymentKey environmentKey)
environmentKey
- ket of the environment to findvoid save(@NotNull MutableEnvironment environment)
environment
- to save.<E extends MutableEnvironment> void saveAll(@NotNull Collection<E> environments)
environments
- @NotNull List<MutableEnvironment> getEnvironmentsForDeploymentProject(long deploymentProjectId)
deploymentProjectId
- of the Deployment Projectvoid delete(@NotNull MutableEnvironment environment)
environment
- @NotNull List<EnvironmentStub> getEnvironmentStubsForDeploymentProject(long deploymentProjectId)
deploymentProjectId
- of the Deployment Projectboolean isEnvironmentNameConflicting(@NotNull MutableDeploymentProject deploymentProject, @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 List<? extends MutableEnvironment> findAll(int firstResult, int pageSize)
@NotNull List<Pair<Requirement,MutableEnvironment>> findEnvironmentsByRequirementKey(@NotNull String requirementKey)
requirementKey
- on which environments rely@NotNull MutableEnvironment createNewEnvironmentInstance()
@Nullable MutableEnvironment findEnvironmentByName(long deploymentProjectId, String name)
deploymentProjectId
- name
- @NotNull List<MutableEnvironment> getPaginatedEnvironmentsForDeploymentProject(long deploymentProjectId, int start, int limit, String filter)
start
- startlimit
- max size of resultdeploymentProjectId
- of the Deployment Projectvoid 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 positionCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.