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

com.atlassian.bamboo.specs.builders.trigger.PlansGreenTriggerCondition Maven / Gradle / Ivy

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

import com.atlassian.bamboo.specs.api.builders.plan.PlanIdentifier;
import com.atlassian.bamboo.specs.api.builders.trigger.TriggerCondition;
import com.atlassian.bamboo.specs.api.model.plan.PlanIdentifierProperties;
import com.atlassian.bamboo.specs.api.util.EntityPropertiesBuilders;
import com.atlassian.bamboo.specs.model.trigger.PlansGreenTriggerConditionProperties;

import java.util.LinkedHashSet;
import java.util.Set;

public class PlansGreenTriggerCondition extends TriggerCondition {
    private final Set plans = new LinkedHashSet<>();

    public PlansGreenTriggerCondition plans(PlanIdentifier... plans) {
        for (PlanIdentifier plan : plans) {
            this.plans.add(EntityPropertiesBuilders.build(plan));
        }
        return this;
    }

    @Override
    protected PlansGreenTriggerConditionProperties build() {
        return new PlansGreenTriggerConditionProperties(plans);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy