Newer
Older
/*
* This file is part of vospace-file-service
* Copyright (C) 2021 Istituto Nazionale di Astrofisica
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package it.inaf.ia2.transfer.service;
import it.inaf.ia2.transfer.auth.TokenPrincipal;
import java.util.List;
public class ArchiveJob {
public static enum Type {
TAR,
TGZ,
ZIP;
public String getExtension() {
switch (this) {
case TAR:
return "tar";
case TGZ:
return "tar.gz";
case ZIP:
return "zip";
default:
throw new IllegalArgumentException("Extension not defined for type " + this);
}
}
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
}
private List<String> vosPaths;
private TokenPrincipal tokenPrincipal;
private String jobId;
private Type type;
public List<String> getVosPaths() {
return vosPaths;
}
public void setVosPaths(List<String> vosPaths) {
this.vosPaths = vosPaths;
}
public TokenPrincipal getPrincipal() {
return tokenPrincipal;
}
public void setPrincipal(TokenPrincipal tokenPrincipal) {
this.tokenPrincipal = tokenPrincipal;
}
public String getJobId() {
return jobId;
}
public void setJobId(String jobId) {
this.jobId = jobId;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
}