feat(制品库功能开发): 快照制品库暂不提供制品删除接口

This commit is contained in:
OTTO 2024-07-17 14:10:01 +08:00
parent b70a1d18f4
commit 86fca8fa3f
1 changed files with 0 additions and 88 deletions

View File

@ -134,92 +134,4 @@ public class PmsProductLibrarySnapshotController extends BaseController {
pmsProductLibraryComponentService.getComponentDetailByComponentId(enterpriseIdentifier, repoName, snapshotName, componentId, false);
return success(result);
}
/**
* 快照库获取制品文件夹是否能删除状态
*/
@GetMapping("/{repoName}/{snapshotName}/component/canDeleteFolder")
@ApiOperation(value = "快照库获取制品文件夹是否能删除的状态")
public AjaxResult canDeleteFolder(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName,
@Valid ComponentSearchVo componentSearchVo) {
componentSearchVo.setRepositoryName(repoName);
componentSearchVo.setSnapshotRepoName(snapshotName);
NexusComponentResultVo<Boolean> result =
pmsProductLibraryComponentService.getCanDeleteFolderByNode(enterpriseIdentifier, componentSearchVo, false);
return success(result);
}
/**
* 快照库获取制品文件夹是否能删除状态
*/
@GetMapping("/component/{repoName}/{snapshotName}/canDeleteComponent/{componentId}")
@ApiOperation(value = "快照库获取制品是否能删除的状态")
public AjaxResult canDeleteComponent(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName,
@PathVariable("componentId") String componentId) {
NexusComponentResultVo<Boolean> result =
pmsProductLibraryComponentService.getCanDeleteComponentByComponentId(enterpriseIdentifier, repoName, snapshotName, componentId, false);
return success(result);
}
/**
* 快照库获取制品文件夹是否能删除状态
*/
@GetMapping("/component/{repoName}/{snapshotName}/canDeleteAsset/{assetId}")
@ApiOperation(value = "快照库获取制品文件是否能删除的状态")
public AjaxResult canDeleteAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName,
@PathVariable("assetId") String assetId) {
NexusComponentResultVo<Boolean> result =
pmsProductLibraryComponentService.getCanDeleteAssetByAssetId(enterpriseIdentifier, repoName, snapshotName, assetId, false);
return success(result);
}
/**
* 快照库删除制品文件
*/
@DeleteMapping("/component/{repoName}/{snapshotName}/deleteAsset/{assetId}")
@ApiOperation(value = "快照库删除制品文件")
public AjaxResult deleteAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName,
@PathVariable("assetId") String assetId) {
NexusComponentResultVo<List<String>> result =
pmsProductLibraryComponentService.deleteAssetByAssetId(enterpriseIdentifier, repoName, snapshotName, assetId, false);
return success(result);
}
/**
* 快照库删除制品
*/
@DeleteMapping("/component/{repoName}/{snapshotName}/deleteComponent/{componentId}")
@ApiOperation(value = "快照库删除制品")
public AjaxResult deleteComponent(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName,
@PathVariable("componentId") String componentId) {
NexusComponentResultVo<List<String>> result =
pmsProductLibraryComponentService.deleteComponentByComponentId(enterpriseIdentifier, repoName, snapshotName, componentId, false);
return success(result);
}
/**
* 快照库异步删除制品文件夹
*/
@DeleteMapping("/{repoName}/{snapshotName}/component/deleteFolder")
@ApiOperation(value = "快照库异步删除制品文件夹")
public AjaxResult deleteFolder(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName,
@Valid ComponentSearchVo componentSearchVo) {
componentSearchVo.setRepositoryName(repoName);
componentSearchVo.setSnapshotRepoName(snapshotName);
NexusComponentResultVo<Object> result =
pmsProductLibraryComponentService.deleteFolderByNode(enterpriseIdentifier, componentSearchVo, false);
return success(result);
}
}