private void translateDomainToDto(List<Distribution> dists, List<DistributionDetails> distDetails) {
DistributionManagerLocal distManager = LookupUtil.getDistributionManagerLocal();
for (Distribution d : dists) {
DistributionDetails detail = new DistributionDetails(d.getLabel(), d.getDistributionType().getName());
detail.setLabel(d.getLabel());
detail.setDistributionPath(d.getBasePath());
detail.setDescription(d.getDistributionType().getDescription());
List<DistributionFile> files = distManager.getDistributionFilesByDistId(d.getId());
for (DistributionFile f : files) {
DistributionFileDetails dfd = new DistributionFileDetails(f.getRelativeFilename(), f.getLastModified(),
f.getMd5sum());
detail.addFile(dfd);
}
distDetails.add(detail);
}
}