Skip to content
Snippets Groups Projects
Commit 31c44baa authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Minor changes to allow pushToVoSpace operation

parent 5157ea1f
No related branches found
No related tags found
No related merge requests found
Pipeline #881 passed
...@@ -22,6 +22,7 @@ public class JobService { ...@@ -22,6 +22,7 @@ public class JobService {
enum JobType { enum JobType {
pullToVoSpace, pullToVoSpace,
pullFromVoSpace, pullFromVoSpace,
pushToVoSpace,
moveNode, moveNode,
copyNode copyNode
} }
...@@ -47,7 +48,8 @@ public class JobService { ...@@ -47,7 +48,8 @@ public class JobService {
handlePullToVoSpace(job); handlePullToVoSpace(job);
break; break;
case pullFromVoSpace: case pullFromVoSpace:
handlePullFromVoSpace(job); case pushToVoSpace:
handleVoSpaceUrlsListResult(job);
break; break;
default: default:
throw new UnsupportedOperationException("Not implemented yet"); throw new UnsupportedOperationException("Not implemented yet");
...@@ -59,7 +61,7 @@ public class JobService { ...@@ -59,7 +61,7 @@ public class JobService {
tapeService.startJob(job); tapeService.startJob(job);
} }
private void handlePullFromVoSpace(JobSummary job) { private void handleVoSpaceUrlsListResult(JobSummary job) {
job.setPhase(ExecutionPhase.EXECUTING); job.setPhase(ExecutionPhase.EXECUTING);
uriService.setTransferJobResult(job); uriService.setTransferJobResult(job);
jobDAO.updateJob(job); jobDAO.updateJob(job);
......
...@@ -52,7 +52,8 @@ public class UriService { ...@@ -52,7 +52,8 @@ public class UriService {
Protocol protocol = transfer.getProtocols().get(0); 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()); throw new IllegalStateException("Unsupported protocol " + protocol.getUri());
} }
protocol.setEndpoint(getEndpoint(job)); protocol.setEndpoint(getEndpoint(job));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment