Interface EnvironmentTriggerService

All Known Implementing Classes:
EnvironmentTriggerServiceImpl

public interface EnvironmentTriggerService
  • Method Details

    • 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 to
      triggerModuleDescriptor - for the TriggerDefinition to be added
      userDescription - description the user has specified for this TriggerDefinition
      isEnabled - set enabled/disabled state of the newly created trigger
      configuration - configuration from the plugin for this TriggerDefinition
      Returns:
      the TriggerDefinition created
      Throws:
      IllegalArgumentException - if environmentId is invalid
    • deleteEnvironmentTrigger

      void deleteEnvironmentTrigger(long environmentId, long triggerId) throws IllegalArgumentException, IllegalStateException
      Delete a given trigger Definition
      Parameters:
      environmentId - id of an environment the triggerDefinition belongs to
      triggerId - of the TriggerDefinition to delete.
      Throws:
      IllegalArgumentException - if environmentId is invalid
      IllegalStateException - 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 to
      triggerId - the TriggerDefinition to edit
      userDescription - new user description
      isEnabled - set new enabled/disabled state
      triggerConfigurationMap - new task Configuration
      Returns:
      TriggerDefinition with 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