@Override public String toString() { return "PackageMetadata{" + "id='" + getId() + '\'' + ", apiVersion='" + apiVersion + '\'' + ", origin='" + origin + '\'' + ", repositoryName='" + repositoryName + '\'' + ", kind='" + kind + '\'' + ", name='" + name + '\'' + ", version='" + version + '\'' + ", packageSourceUrl='" + packageSourceUrl + '\'' + ", packageHomeUrl='" + packageHomeUrl + '\'' + ", tags='" + tags + '\'' + ", maintainer='" + maintainer + '\'' + ", description='" + description + '\'' + ", sha256='" + sha256 + '\'' + ", iconUrl='" + iconUrl + '\'' + '}'; } }
@Override public String toString() { return "PackageMetadata{" + "id='" + getId() + '\'' + ", apiVersion='" + apiVersion + '\'' + ", origin='" + origin + '\'' + ", repositoryName='" + repositoryName + '\'' + ", kind='" + kind + '\'' + ", name='" + name + '\'' + ", version='" + version + '\'' + ", packageSourceUrl='" + packageSourceUrl + '\'' + ", packageHomeUrl='" + packageHomeUrl + '\'' + ", tags='" + tags + '\'' + ", maintainer='" + maintainer + '\'' + ", description='" + description + '\'' + ", sha256='" + sha256 + '\'' + ", iconUrl='" + iconUrl + '\'' + '}'; } }
public void setPkg(Package pkg) { this.pkg = pkg; this.packageMetadataId = pkg.getMetadata().getId(); this.repositoryId = pkg.getMetadata().getRepositoryId(); ObjectMapper mapper = new ObjectMapper(); try { // Note that @JsonIgnore is on the package file byte array field. this.pkgJsonString = mapper.writeValueAsString(pkg); } catch (JsonProcessingException e) { throw new SkipperException("Error processing pkg json string", e); } }
public void setPkg(Package pkg) { this.pkg = pkg; this.packageMetadataId = pkg.getMetadata().getId(); this.repositoryId = pkg.getMetadata().getRepositoryId(); ObjectMapper mapper = new ObjectMapper(); try { // Note that @JsonIgnore is on the package file byte array field. this.pkgJsonString = mapper.writeValueAsString(pkg); } catch (JsonProcessingException e) { throw new SkipperException("Error processing pkg json string", e); } }
@Override public Resource<PackageMetadata> process(Resource<PackageMetadata> packageMetadataResource) { Link installLink = linkTo( methodOn(PackageController.class).install(packageMetadataResource.getContent().getId(), null)) .withRel("install"); packageMetadataResource.add(installLink); return packageMetadataResource; } }
@Override public Resource<PackageMetadata> process(Resource<PackageMetadata> packageMetadataResource) { Link installLink = linkTo( methodOn(PackageController.class).install(packageMetadataResource.getContent().getId(), null)) .withRel("install"); packageMetadataResource.add(installLink); return packageMetadataResource; } }
List<Release> releases = this.releaseRepository.findByRepositoryIdAndPackageMetadataIdOrderByNameAscVersionDesc( packageMetadata.getRepositoryId(), packageMetadata.getId()); boolean canDelete = true;
List<Release> releases = this.releaseRepository.findByRepositoryIdAndPackageMetadataIdOrderByNameAscVersionDesc( packageMetadata.getRepositoryId(), packageMetadata.getId()); boolean canDelete = true;