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

io.automatiko.engine.decision.dmn.DmnDecisionModels Maven / Gradle / Ivy

There is a newer version: 0.38.0
Show newest version
package io.automatiko.engine.decision.dmn;

import java.util.ArrayList;
import java.util.List;

import io.automatiko.engine.api.decision.DecisionModel;
import io.automatiko.engine.api.decision.DecisionModels;

public class DmnDecisionModels implements DecisionModels {

    private List decisionModels = new ArrayList<>();

    public DmnDecisionModels(List decisionModels) {
        if (decisionModels != null) {
            this.decisionModels.addAll(decisionModels);
        }
    }

    @Override
    public DecisionModel getDecisionModel(String namespace, String name) {
        return decisionModels.stream()
                .filter(dm -> dm.getDMNModel().getNamespace().equals(namespace) && dm.getDMNModel().getName().equals(name))
                .findAny()
                .orElse(null);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy