use of org.eclipse.winery.repository.common.RepositoryFileReference in project container by OpenTOSCA.
the class BpelPlanEnginePlugin method planLocationOnDisk.
@Nullable
private Path planLocationOnDisk(CsarId csarId, QName planId, PlanModelReference planRef) {
Csar csar = storage.findById(csarId);
IRepository repository = RepositoryFactory.getRepository(csar.getSaveLocation());
PlanId plan = new PlanId(new PlansId(new ServiceTemplateId(csar.entryServiceTemplate().getTargetNamespace(), csar.entryServiceTemplate().getId(), false)), new XmlId(planId.toString(), false));
Collection<RepositoryFileReference> fileRefs = repository.getContainedFiles(plan);
Path planPath = null;
for (RepositoryFileReference ref : fileRefs) {
if (ref.getFileName().endsWith(".zip")) {
planPath = repository.ref2AbsolutePath(ref);
}
}
return planPath;
}
Aggregations