All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.atlassian.bamboo.specs.builders.notification.XFailedChainsNotification Maven / Gradle / Ivy

There is a newer version: 10.1.0
Show newest version
package com.atlassian.bamboo.specs.builders.notification;

import com.atlassian.bamboo.specs.api.builders.notification.NotificationType;
import com.atlassian.bamboo.specs.model.notification.XFailedChainsNotificationProperties;
import org.jetbrains.annotations.NotNull;

/**
 * Represents a notification sent when plan consecutively fails for a specified number of times.
 */
public class XFailedChainsNotification extends NotificationType {
    private int numberOfFailures = 1;

    /**
     * Specifies how many consecutive failures should trigger the notification. Defaults to 1.
     */
    public XFailedChainsNotification numberOfFailures(int numberOfFailures) {
        this.numberOfFailures = numberOfFailures;
        return this;
    }

    @NotNull
    @Override
    protected XFailedChainsNotificationProperties build() {
        return new XFailedChainsNotificationProperties(numberOfFailures);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy