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

com.chutneytesting.action.domain.ActionTemplateLoaders Maven / Gradle / Ivy

The newest version!
/*
 * SPDX-FileCopyrightText: 2017-2024 Enedis
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 */

package com.chutneytesting.action.domain;

import java.util.List;
import java.util.stream.Collectors;

/**
 * A Collection of loaders, allow to get all {@link ActionTemplate} in order, respecting each {@link ActionTemplateLoader} precedence.
 */
public class ActionTemplateLoaders {

    private final List loaders;

    public ActionTemplateLoaders(List loaders) {
        this.loaders = loaders;
    }

    List orderedTemplates() {
        return loaders
            .stream()
            .flatMap(delegate -> delegate.load().stream())
            .collect(Collectors.toList());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy