net.nemerosa.ontrack.model.structure.CopyService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
package net.nemerosa.ontrack.model.structure;
import java.util.function.Function;
/**
* Service used for the duplication, copying and cloning of information.
*/
public interface CopyService {
/**
* Copies the configuration of the {@linkplain BranchCopyRequest#sourceBranchId source branch}
* to the target branch.
*/
Branch copy(Branch branch, BranchCopyRequest request);
/**
* Copies the configuration of the source branch
* to the target branch.
*/
Branch copy(Branch targetBranch, Branch sourceBranch, Function replacementFn, SyncPolicy syncPolicy);
/**
* Clones the branch
into a new branch
*
* @param branch Branch to clone (untouched)
* @param request Cloning instructions
* @return Created branch
*/
Branch cloneBranch(Branch branch, BranchCloneRequest request);
/**
* Clones the project
into a new project
*
* @param project Project to clone (untouched)
* @param request Cloning instructions
* @return Created project
*/
Project cloneProject(Project project, ProjectCloneRequest request);
/**
* Bulk update for a branch, by using replacements on all its components.
*
* @param branch Branch to update
* @param request Update instructions
* @return Updated branch
*/
Branch update(Branch branch, BranchBulkUpdateRequest request);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy