1 package org.kuali.common.util.file.model; 2 3 import java.util.List; 4 5 import com.google.common.collect.ImmutableList; 6 7 public final class RepoArtifacts { 8 9 public RepoArtifacts(Repository repository, List<ArtifactForTesting> artifacts) { 10 this.repository = repository; 11 this.artifacts = ImmutableList.copyOf(artifacts); 12 this.size = getSize(artifacts); 13 } 14 15 private static long getSize(List<ArtifactForTesting> artifacts) { 16 long size = 0; 17 for (ArtifactForTesting artifact : artifacts) { 18 size += artifact.getFile().getSize(); 19 } 20 return size; 21 } 22 23 private final Repository repository; 24 private final List<ArtifactForTesting> artifacts; 25 private final long size; 26 27 public Repository getRepository() { 28 return repository; 29 } 30 31 public List<ArtifactForTesting> getArtifacts() { 32 return artifacts; 33 } 34 35 public long getSize() { 36 return size; 37 } 38 }