Commit dd18567a authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Minor changes to allow pushToVoSpace operation

parent 68ac8771
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
+2 −1
Original line number Diff line number Diff line
@@ -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));