|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EnvironmentService
Provides services and functionality around Environments. All objects returned/inputted are immutable.
Field Summary | |
---|---|
static String |
DEFAULT_ARTIFACT_TASK_NAME
|
Method Summary | |
---|---|
Environment |
addEnvironment(long deploymentProjectId,
String name,
String description)
Creates a new environment in the specified deployment project. |
void |
addNotification(long environmentId,
NotificationRule newRule)
Adds a new notification to the environment notifications |
Environment |
cloneEnvironment(long deploymentProjectId,
long environmentId,
String name,
String description)
Create new environment as a clone of existing one |
void |
deleteNotification(long environmentId,
long notificationId)
Removes notification from the environment's notification set. |
Environment |
editEnvironment(long environmentId,
String name,
String description)
Edit the details of an existing environment |
Iterable<Environment> |
getAllEnvironments()
Retrieve all Environment defined in the system. |
Iterable<Environment> |
getAllEnvironmentsNoUserContext()
Retrieve all Environment defined in the system without filling in operations permitted for the user. |
Environment |
getEnvironment(long environmentId)
Get specific environment by ID. |
int |
getEnvironmentCount()
|
int |
getEnvironmentCountForProject(DeploymentProject deploymentProject)
|
RequirementSet |
getEnvironmentRequirementSet(long environmentId)
Retrieve Agent Requirement set for environment, if environment with id exists. |
List<Environment> |
getEnvironmentsForDeploymentProject(long deploymentProjectId)
Get all environments for a particular deployment project. |
List<EnvironmentRepositoryLink> |
getEnvironmentsUsingRepository(long repositoryId)
Retrieves |
NotificationSet |
getNotificationSet(long environmentId)
Retrieve notification set for environment, if environment with id exists. |
List<RepositoryDefinition> |
getRepositoryDefinitionsForEnvironment(Environment environment)
Retrieves all repositories used in environment source checkout tasks |
ErrorCollection |
moveEnvironmentDown(long deploymentProjectId,
long environmentId,
int currentPosition)
Moves an environment down the list |
ErrorCollection |
moveEnvironmentUp(long deploymentProjectId,
long environmentId,
int currentPosition)
Moves an environment up the list |
void |
restartAllTriggeringForDeploymentProject(long deploymentProjectId)
Restart all automatic triggering on every Environment related to a DeploymentProject . |
void |
startAllTriggers(Environment environment)
Start all automatic triggering on InternalEnvironment |
void |
startAllTriggersForDeploymentProject(long deploymentProjectId)
Start all automatic triggering on every Environment related to a DeploymentProject |
void |
stopAllTriggers(Environment environment)
Stop all automatic triggering on InternalEnvironment |
void |
stopAllTriggersForDeploymentProject(long deploymentProjectId)
Stop all automatic triggering on every Environment related to a DeploymentProject |
void |
updateEnvironmentConfigurationState(long environmentId,
ConfigurationState configurationState)
Update the configurationState of this environment |
void |
updatePlanKey(long deploymentProjectId,
PlanKey originalPlanKey,
PlanKey newPlanKey)
Update planKey in Environment related configuration when plan key has changed (ie after moving plan). |
RepositoryDefinition |
updateRepositoryLinkInEnvironment(EnvironmentRepositoryLink environmentRepositoryLink,
RepositoryDataEntity newRepositoryEntity)
Update EnvironmentRepositoryLink data |
ErrorCollection |
validateAddEnvironment(long deploymentProjectId,
String name,
String description)
Validates values to be used for creating a new environment. |
ErrorCollection |
validateEditEnvironment(long environmentId,
String name,
String description)
Validates values to be used when editing existing environment. |
Field Detail |
---|
static final String DEFAULT_ARTIFACT_TASK_NAME
Method Detail |
---|
@NotNull List<Environment> getEnvironmentsForDeploymentProject(long deploymentProjectId)
deploymentProjectId
- of the deployment project to get environments for
@Nullable Environment getEnvironment(long environmentId)
environmentId
- ID to search for
@NotNull ErrorCollection validateAddEnvironment(long deploymentProjectId, @Nullable String name, @Nullable String description)
deploymentProjectId
- name
- description
-
@NotNull Environment addEnvironment(long deploymentProjectId, @Nullable String name, @Nullable String description) throws WebValidationException
deploymentProjectId
- to create environment inname
- of the environment.description
- of the environment.
WebValidationException
Environment cloneEnvironment(long deploymentProjectId, long environmentId, @Nullable String name, @Nullable String description) throws WebValidationException
environmentId
- name
- description
-
WebValidationException
@NotNull ErrorCollection validateEditEnvironment(long environmentId, @Nullable String name, @Nullable String description)
environmentId
- environment to editname
- of the environmentdescription
- of the environment
@NotNull Environment editEnvironment(long environmentId, String name, String description) throws WebValidationException
environmentId
- environment to editname
- of the environmentdescription
- of the environment
WebValidationException
void updateEnvironmentConfigurationState(long environmentId, @NotNull ConfigurationState configurationState)
environmentId
- of environment to updateconfigurationState
- new configuration state@Nullable RequirementSet getEnvironmentRequirementSet(long environmentId)
environmentId
- of environment
@NotNull Iterable<Environment> getAllEnvironments()
Environment
defined in the system. The result is filtered by permissions.
@NotNull Iterable<Environment> getAllEnvironmentsNoUserContext()
Environment
defined in the system without filling in operations permitted for the user.
@NotNull List<RepositoryDefinition> getRepositoryDefinitionsForEnvironment(@NotNull Environment environment)
environment
-
List<EnvironmentRepositoryLink> getEnvironmentsUsingRepository(long repositoryId)
repositoryId
-
RepositoryDefinition updateRepositoryLinkInEnvironment(EnvironmentRepositoryLink environmentRepositoryLink, RepositoryDataEntity newRepositoryEntity)
EnvironmentRepositoryLink
data
environmentRepositoryLink
- newRepositoryEntity
-
void addNotification(long environmentId, @NotNull NotificationRule newRule) throws WebValidationException
WebValidationException
@Nullable NotificationSet getNotificationSet(long environmentId)
environmentId
- of environmentvoid deleteNotification(long environmentId, long notificationId) throws WebValidationException
WebValidationException
void stopAllTriggers(@NotNull Environment environment)
InternalEnvironment
environment
- void startAllTriggers(@NotNull Environment environment)
InternalEnvironment
environment
- void stopAllTriggersForDeploymentProject(long deploymentProjectId)
Environment
related to a DeploymentProject
deploymentProjectId
- void startAllTriggersForDeploymentProject(long deploymentProjectId)
Environment
related to a DeploymentProject
deploymentProjectId
- void restartAllTriggeringForDeploymentProject(long deploymentProjectId)
Environment
related to a DeploymentProject
.
When using this method please keep in mind that triggers should be stopped before modifying their configuration
and restarted afterwards. Thus stopAllTriggersForDeploymentProject(long)
and
startAllTriggersForDeploymentProject(long)
might be more useful.
@NotNull ErrorCollection moveEnvironmentUp(long deploymentProjectId, long environmentId, int currentPosition)
@NotNull ErrorCollection moveEnvironmentDown(long deploymentProjectId, long environmentId, int currentPosition)
int getEnvironmentCount()
int getEnvironmentCountForProject(DeploymentProject deploymentProject)
deploymentProject
-
void updatePlanKey(long deploymentProjectId, @NotNull PlanKey originalPlanKey, @NotNull PlanKey newPlanKey)
DeploymentProjectService.updatePlanKey(PlanKey, PlanKey)
after DeploymentProject has been updated.
deploymentProjectId
- id of deployment project which environments have to be checkedoriginalPlanKey
- original PlanKeynewPlanKey
- new PlanKey
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |