Interface EnvironmentTriggerService
-
- All Known Implementing Classes:
EnvironmentTriggerServiceImpl
public interface EnvironmentTriggerService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TriggerDefinitioncreateEnvironmentTrigger(long environmentId, @NotNull TriggerModuleDescriptor triggerModuleDescriptor, @Nullable String userDescription, boolean isEnabled, @NotNull Map<String,String> configuration)Create a trigger Definition and save it against the planvoiddeleteEnvironmentTrigger(long environmentId, long triggerId)Delete a given trigger DefinitionvoiddeleteEnvironmentTriggers(long environmentId, Predicate<TriggerDefinition> shouldBeRemoved)Delete all triggers that match a predicate.TriggerDefinitioneditEnvironmentTrigger(long environmentId, long triggerId, @Nullable String userDescription, boolean isEnabled, @NotNull Map<String,String> triggerConfigurationMap)Update the details of specific triggerDefinition@Nullable PlanKeygetCalculatedTriggeringPlanKey(@NotNull InternalEnvironment environment, @NotNull DeploymentTriggerBranchSelectionMode branchSelectionMode, @Nullable PlanKey customBranchKey)
-
-
-
Method Detail
-
createEnvironmentTrigger
TriggerDefinition createEnvironmentTrigger(long environmentId, @NotNull @NotNull TriggerModuleDescriptor triggerModuleDescriptor, @Nullable @Nullable String userDescription, boolean isEnabled, @NotNull @NotNull Map<String,String> configuration) throws IllegalArgumentException
Create a trigger Definition and save it against the plan- Parameters:
environmentId- id of an environment the triggerDefinition belongs totriggerModuleDescriptor- for the TriggerDefinition to be addeduserDescription- description the user has specified for this TriggerDefinitionisEnabled- set enabled/disabled state of the newly created triggerconfiguration- configuration from the plugin for this TriggerDefinition- Returns:
- the
TriggerDefinitioncreated - Throws:
IllegalArgumentException- if environmentId is invalid
-
deleteEnvironmentTrigger
void deleteEnvironmentTrigger(long environmentId, long triggerId) throws IllegalArgumentException, IllegalStateExceptionDelete a given trigger Definition- Parameters:
environmentId- id of an environment the triggerDefinition belongs totriggerId- of the TriggerDefinition to delete.- Throws:
IllegalArgumentException- if environmentId is invalidIllegalStateException- if the task list has changed since submitting request, i.e the task isn't there to delete anymore.
-
editEnvironmentTrigger
TriggerDefinition editEnvironmentTrigger(long environmentId, long triggerId, @Nullable @Nullable String userDescription, boolean isEnabled, @NotNull @NotNull Map<String,String> triggerConfigurationMap) throws IllegalArgumentException
Update the details of specific triggerDefinition- Parameters:
environmentId- id of an environment the triggerDefinition belongs totriggerId- the TriggerDefinition to edituserDescription- new user descriptionisEnabled- set new enabled/disabled statetriggerConfigurationMap- new task Configuration- Returns:
TriggerDefinitionwith updates.- Throws:
IllegalArgumentException- if environmentId or triggerId is invalid.
-
getCalculatedTriggeringPlanKey
@Nullable @Nullable PlanKey getCalculatedTriggeringPlanKey(@NotNull @NotNull InternalEnvironment environment, @NotNull @NotNull DeploymentTriggerBranchSelectionMode branchSelectionMode, @Nullable @Nullable PlanKey customBranchKey) throws DeploymentException
- Throws:
DeploymentException
-
deleteEnvironmentTriggers
void deleteEnvironmentTriggers(long environmentId, Predicate<TriggerDefinition> shouldBeRemoved)Delete all triggers that match a predicate.- Since:
- 6.8
-
-