stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// ArtifactMigrationService.Results.cs
|
||||
// Sprint: SPRINT_20260118_017_Evidence_artifact_store_unification
|
||||
// Task: AS-006 - Migrate existing evidence to unified store
|
||||
// Description: Result composition helpers for migration
|
||||
// -----------------------------------------------------------------------------
|
||||
using StellaOps.Artifact.Core;
|
||||
|
||||
namespace StellaOps.Artifact.Infrastructure;
|
||||
|
||||
public sealed partial class ArtifactMigrationService
|
||||
{
|
||||
private static ArtifactMigrationResult CreateFailureResult(LegacyArtifact legacy, string message)
|
||||
{
|
||||
return new ArtifactMigrationResult
|
||||
{
|
||||
OriginalPath = legacy.LegacyPath,
|
||||
NewPath = null,
|
||||
Success = false,
|
||||
Skipped = false,
|
||||
ErrorMessage = message
|
||||
};
|
||||
}
|
||||
|
||||
private static ArtifactMigrationResult CreateSkippedResult(
|
||||
LegacyArtifact legacy,
|
||||
MigrationIdentifiers identifiers)
|
||||
{
|
||||
return new ArtifactMigrationResult
|
||||
{
|
||||
OriginalPath = legacy.LegacyPath,
|
||||
NewPath = null,
|
||||
Success = true,
|
||||
Skipped = true,
|
||||
BomRef = identifiers.BomRef,
|
||||
SerialNumber = identifiers.SerialNumber
|
||||
};
|
||||
}
|
||||
|
||||
private static ArtifactMigrationResult CreateStoreResult(
|
||||
LegacyArtifact legacy,
|
||||
MigrationIdentifiers identifiers,
|
||||
ArtifactStoreResult storeResult)
|
||||
{
|
||||
return new ArtifactMigrationResult
|
||||
{
|
||||
OriginalPath = legacy.LegacyPath,
|
||||
NewPath = storeResult.StorageKey,
|
||||
Success = storeResult.Success,
|
||||
Skipped = false,
|
||||
BomRef = identifiers.BomRef,
|
||||
SerialNumber = identifiers.SerialNumber,
|
||||
ErrorMessage = storeResult.ErrorMessage
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user