public class PackageMetadataService extends Object implements ResourceLoaderAware
Modifier and Type | Field and Description |
---|---|
static Predicate<org.springframework.cloud.skipper.domain.Release> |
DEFAULT_RELEASE_ACTIVITY_CHECK |
Constructor and Description |
---|
PackageMetadataService(RepositoryRepository repositoryRepository,
PackageMetadataRepository packageMetadataRepository,
ReleaseRepository releaseRepository) |
Modifier and Type | Method and Description |
---|---|
void |
deleteIfAllReleasesDeleted(String packageName,
Predicate<org.springframework.cloud.skipper.domain.Release> releaseCheckPredicate)
Delete all versions of the package metadata only if the latest releases currently using
it are in the StatusCode.DELETED state.
|
protected List<org.springframework.cloud.skipper.domain.PackageMetadata> |
deserializeFromIndexFiles(List<File> indexFiles) |
List<org.springframework.cloud.skipper.domain.PackageMetadata> |
downloadPackageMetadata()
Download package metadata from all repositories.
|
List<org.springframework.cloud.skipper.domain.Release> |
filterReleasesFromLocalRepos(List<org.springframework.cloud.skipper.domain.Release> releases,
String packageMetadataName)
Return a list of releases that have a specific package and the package is in a local repository
|
void |
setResourceLoader(ResourceLoader resourceLoader) |
public static final Predicate<org.springframework.cloud.skipper.domain.Release> DEFAULT_RELEASE_ACTIVITY_CHECK
public PackageMetadataService(RepositoryRepository repositoryRepository, PackageMetadataRepository packageMetadataRepository, ReleaseRepository releaseRepository)
@Transactional public void deleteIfAllReleasesDeleted(String packageName, Predicate<org.springframework.cloud.skipper.domain.Release> releaseCheckPredicate)
packageName
- the name of the package@Transactional public List<org.springframework.cloud.skipper.domain.Release> filterReleasesFromLocalRepos(List<org.springframework.cloud.skipper.domain.Release> releases, String packageMetadataName)
releases
- A list of releasespackageMetadataName
- the package name.@Transactional public List<org.springframework.cloud.skipper.domain.PackageMetadata> downloadPackageMetadata()
protected List<org.springframework.cloud.skipper.domain.PackageMetadata> deserializeFromIndexFiles(List<File> indexFiles)
public void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader
in interface ResourceLoaderAware
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.