diff --git a/src/main/java/it/inaf/oats/vospace/JobService.java b/src/main/java/it/inaf/oats/vospace/JobService.java index 9beca1eb550bcfc66e2d41ca17d767479591d6a6..9e90f41454dee187c805cf87cfbbdf65676978a3 100644 --- a/src/main/java/it/inaf/oats/vospace/JobService.java +++ b/src/main/java/it/inaf/oats/vospace/JobService.java @@ -22,6 +22,7 @@ public class JobService { enum JobType { pullToVoSpace, pullFromVoSpace, + pushToVoSpace, moveNode, copyNode } @@ -47,7 +48,8 @@ public class JobService { handlePullToVoSpace(job); break; case pullFromVoSpace: - handlePullFromVoSpace(job); + case pushToVoSpace: + handleVoSpaceUrlsListResult(job); break; default: throw new UnsupportedOperationException("Not implemented yet"); @@ -59,7 +61,7 @@ public class JobService { tapeService.startJob(job); } - private void handlePullFromVoSpace(JobSummary job) { + private void handleVoSpaceUrlsListResult(JobSummary job) { job.setPhase(ExecutionPhase.EXECUTING); uriService.setTransferJobResult(job); jobDAO.updateJob(job); diff --git a/src/main/java/it/inaf/oats/vospace/UriService.java b/src/main/java/it/inaf/oats/vospace/UriService.java index 4a2cb5382ea4e7f4bb2daded90bdb74353142796..d1dfb6fd3af6ceb7ffe9e743dc4d498080f647e7 100644 --- a/src/main/java/it/inaf/oats/vospace/UriService.java +++ b/src/main/java/it/inaf/oats/vospace/UriService.java @@ -52,7 +52,8 @@ public class UriService { Protocol protocol = transfer.getProtocols().get(0); - if (!"ivo://ivoa.net/vospace/core#httpget".equals(protocol.getUri())) { + if (!"ivo://ivoa.net/vospace/core#httpget".equals(protocol.getUri()) + && !"ivo://ivoa.net/vospace/core#httpput".equals(protocol.getUri())) { throw new IllegalStateException("Unsupported protocol " + protocol.getUri()); } protocol.setEndpoint(getEndpoint(job));