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

com.atlassian.bamboo.specs.builders.notification.BuildErrorNotification 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.BuildErrorNotificationProperties;
import org.jetbrains.annotations.NotNull;

/**
 * Represents notifications send on build error.
 */
public class BuildErrorNotification extends NotificationType {
    private boolean firstOccurrenceOnly = false;

    public BuildErrorNotification sendForFirstOccurrenceOnly() {
        firstOccurrenceOnly = true;
        return this;
    }

    public BuildErrorNotification sendForAllErrors() {
        firstOccurrenceOnly = false;
        return this;
    }

    @NotNull
    @Override
    protected BuildErrorNotificationProperties build() {
        return new BuildErrorNotificationProperties(firstOccurrenceOnly);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy