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

net.nemerosa.ontrack.model.structure.TemplateSynchronisationSource Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.model.structure;

import com.fasterxml.jackson.databind.JsonNode;
import net.nemerosa.ontrack.model.form.Form;

import java.util.List;

/**
 * Defines where branch names come from when synchronising a template definition with
 * a list of template instances.
 *
 * @param  Type of configuration data
 */
public interface TemplateSynchronisationSource {

    /**
     * ID of the source
     */
    String getId();

    /**
     * Display name for the source
     */
    String getName();

    /**
     * Is this source applicable for a given template branch?
     */
    boolean isApplicable(Branch branch);

    /**
     * Gets the form used for this source in a branch. This can be used
     * to get, for example, SCM information.
     */
    Form getForm(Branch branch);

    /**
     * List of branch names to use on synchronisation.
     */
    List getBranchNames(Branch branch, T config);

    /**
     * Parses the configuration
     */
    T parseConfig(JsonNode node);

    /**
     * Configuration for storage
     */
    JsonNode forStorage(T config);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy