Get rid of artifactRepository naming of ArtifactStorage (#2645)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-09-03 11:55:14 +03:00
committed by GitHub
parent 0e5f1d6526
commit 59cb320fcc
2 changed files with 6 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ public class FileArtifactStorageConfiguration {
*/ */
@Bean @Bean
@ConditionalOnMissingBean @ConditionalOnMissingBean
public ArtifactStorage artifactRepository(final FileArtifactProperties artifactFilesystemProperties) { public ArtifactStorage artifactStorage(final FileArtifactProperties artifactFilesystemProperties) {
return new FileArtifactStorage(artifactFilesystemProperties); return new FileArtifactStorage(artifactFilesystemProperties);
} }
} }

View File

@@ -104,7 +104,7 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
private final RepositoryProperties repositoryProperties; private final RepositoryProperties repositoryProperties;
@Nullable @Nullable
private ArtifactStorage artifactRepository; private ArtifactStorage artifactStorage;
@SuppressWarnings("squid:S00107") @SuppressWarnings("squid:S00107")
protected JpaSystemManagement( protected JpaSystemManagement(
@@ -147,8 +147,8 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
} }
@Autowired(required = false) // it's not required on dmf/ddi only instances @Autowired(required = false) // it's not required on dmf/ddi only instances
public void setArtifactRepository(ArtifactStorage artifactRepository) { public void setArtifactStorage(final ArtifactStorage artifactStorage) {
this.artifactRepository = artifactRepository; this.artifactStorage = artifactStorage;
} }
@Override @Override
@@ -161,7 +161,7 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
@Retryable(retryFor = { ConcurrencyFailureException.class }, maxAttempts = Constants.TX_RT_MAX, @Retryable(retryFor = { ConcurrencyFailureException.class }, maxAttempts = Constants.TX_RT_MAX,
backoff = @Backoff(delay = Constants.TX_RT_DELAY)) backoff = @Backoff(delay = Constants.TX_RT_DELAY))
public void deleteTenant(final String t) { public void deleteTenant(final String t) {
if (artifactRepository == null) { if (artifactStorage == null) {
throw new IllegalStateException("Artifact repository is not available. Can't delete tenant."); throw new IllegalStateException("Artifact repository is not available. Can't delete tenant.");
} }
@@ -180,7 +180,7 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
distributionSetRepository.deleteByTenant(tenant); distributionSetRepository.deleteByTenant(tenant);
distributionSetTypeRepository.deleteByTenant(tenant); distributionSetTypeRepository.deleteByTenant(tenant);
softwareModuleRepository.deleteByTenant(tenant); softwareModuleRepository.deleteByTenant(tenant);
artifactRepository.deleteByTenant(tenant); artifactStorage.deleteByTenant(tenant);
softwareModuleTypeRepository.deleteByTenant(tenant); softwareModuleTypeRepository.deleteByTenant(tenant);
return null; return null;
})); }));