package com.microservices.pms.productLibrary.service;


import com.microservices.pms.productLibrary.domain.PmsProductLibraryComponent;
import com.microservices.pms.productLibrary.domain.PmsProductLibraryRepositories;
import com.microservices.pms.productLibrary.domain.vo.NexusAssetResultDataVo;
import com.microservices.pms.productLibrary.domain.vo.NexusComponentResultDataVo;

import java.util.List;

/**
 * @author OTTO
 */
public interface IPmsProductLibraryAsyncService {
    /**
     * 遍历制品库制品文件列表,同步制品数据
     *
     * @param repo                        制品库
     * @param pmsProductLibraryComponents 制品列表
     */
    void syncNexusMavenRepoComponent(PmsProductLibraryRepositories repo, List<PmsProductLibraryComponent> pmsProductLibraryComponents);

    /**
     * 异步将制品库制品移入到产品库中
     *
     * @param productRepo                产品库
     * @param repo                       制品库
     * @param nexusAssetResultDataVoList 制品列表
     * @param directory
     */
    void asyncAddCommonAssetToProductRepo(PmsProductLibraryRepositories productRepo, PmsProductLibraryRepositories repo, List<NexusAssetResultDataVo> nexusAssetResultDataVoList, String directory);

    /**
     * 同步制品库制品到快照库
     *
     * @param repo         制品库
     * @param snapshotRepo 快照库
     */
    void syncRepoToSnapshotRepo(PmsProductLibraryRepositories repo, PmsProductLibraryRepositories snapshotRepo);

    /**
     * 异步将Docker制品库制品移入到产品库中
     *
     * @param productRepo                    产品库
     * @param repo                           制品库
     * @param nexusComponentResultDataVoList Docker制品列表
     * @param directory
     */
    void asyncAddDockerComponentToProductRepo(PmsProductLibraryRepositories productRepo, PmsProductLibraryRepositories repo, List<NexusComponentResultDataVo> nexusComponentResultDataVoList, String directory);

    /**
     * 打包产品库
     *
     * @param productRepo 产品库
     */
    void packagedProduct(PmsProductLibraryRepositories productRepo);
}
