Get rid of artifactRepository naming of ArtifactStorage (#2645)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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;
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user