Skip to content

Commit 60d3067

Browse files
BRIAN HOLYFIELDBRIAN HOLYFIELD
authored andcommitted
Updates for release 3.0
Updates for release 3.0
1 parent e899c7b commit 60d3067

File tree

88 files changed

+2542
-885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2542
-885
lines changed

SendSafelyAPI/src/com/sendsafely/BasePackage.java

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
11
package com.sendsafely;
22

3+
import java.util.Date;
34
import java.util.List;
45

56
import com.sendsafely.enums.PackageState;
7+
import com.sendsafely.enums.PackageStatus;
68

79
/**
810
* A Java Bean containing information about a package.
911
* Only the Getters should be used from this object, since the server will populate the object.
1012
* Updating the setters will not change any state on the server and should be avoided.
11-
* @author Erik Larsson
1213
*
1314
*/
1415
public class BasePackage {
1516

1617
private String packageId;
18+
private String packageDescriptor;
1719
private String packageCode;
1820
private String serverSecret;
1921
private String keyCode;
2022
private List<File> files;
2123
private List<String> approverList;
2224
private boolean needsApproval;
2325
private PackageState state;
26+
private PackageStatus status;
2427
private int life;
28+
private String rootDirectoryId;
29+
private boolean isWorkspace;
30+
private Date packageTimestamp;
31+
private String packageOwner = "";
2532

2633
/**
2734
* @description The package ID used to identify a given package
@@ -152,6 +159,22 @@ public void setState(PackageState state) {
152159
this.state = state;
153160
}
154161

162+
/**
163+
* @description Returns the current state of the package.
164+
* @return
165+
*/
166+
public PackageStatus getStatus() {
167+
return status;
168+
}
169+
170+
/**
171+
* @description Set internally by the API.
172+
* @param status
173+
*/
174+
public void setStatus(PackageStatus status) {
175+
this.status = status;
176+
}
177+
155178
/**
156179
* @description Get the number of days the final package will be available for before it expires.
157180
* @return
@@ -167,5 +190,51 @@ public int getLife() {
167190
public void setLife(int life) {
168191
this.life = life;
169192
}
193+
194+
public String getRootDirectoryId() {
195+
return rootDirectoryId;
196+
}
197+
198+
public void setRootDirectoryId(String rootDirectoryId) {
199+
this.rootDirectoryId = rootDirectoryId;
200+
}
201+
202+
public String getPackageDescriptor() {
203+
return packageDescriptor;
204+
}
205+
206+
public void setPackageDescriptor(String packageDescriptor) {
207+
this.packageDescriptor = packageDescriptor;
208+
}
209+
210+
public boolean getIsWorkspace() {
211+
return isWorkspace;
212+
}
213+
214+
public void setIsWorkspace(boolean isWorkspace) {
215+
this.isWorkspace = isWorkspace;
216+
}
217+
218+
public Date getPackageTimestamp() {
219+
return packageTimestamp;
220+
}
221+
222+
public void setPackageTimestamp(Date packageTimestamp) {
223+
this.packageTimestamp = packageTimestamp;
224+
}
225+
226+
public String getPackageOwner() {
227+
return packageOwner;
228+
}
229+
230+
public void setPackageOwner(String packageOwner) {
231+
if(packageOwner == null){
232+
this.packageOwner = "";
233+
}else{
234+
this.packageOwner = packageOwner;
235+
}
236+
}
237+
238+
170239

171240
}

SendSafelyAPI/src/com/sendsafely/ContactGroup.java

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package com.sendsafely;
22

33
import java.util.ArrayList;
4-
import java.util.Collection;
5-
import java.util.HashSet;
64
import java.util.List;
7-
import java.util.Map;
85

96
import com.sendsafely.dto.ContactGroupMember;
107

@@ -14,12 +11,12 @@
1411
* contactGroupId, contactGroupName, ContactGroupUsers, and users.
1512
* Only the Getters should be used from this object, since the server will populate the object.
1613
* Updating the setters will not change any state on the server and should be avoided.
17-
* @author michaelnowak
1814
*
1915
*/
2016
public class ContactGroup {
2117
private String contactGroupId;
2218
private String contactGroupName;
19+
private boolean contactGroupIsOrganizationGroup;
2320
private List<ContactGroupMember> users = new ArrayList<ContactGroupMember>(0);
2421

2522
/**
@@ -69,4 +66,24 @@ public List<ContactGroupMember> getContactGroupMembers() {
6966
public void setContactGroupMembers(List<ContactGroupMember> users) {
7067
this.users = users;
7168
}
69+
70+
/**
71+
* @description Gets the status of if it's an enterprise contact group.
72+
* @return is enterprise contact group
73+
*/
74+
public boolean getContactGroupIsOrganizationGroup() {
75+
return contactGroupIsOrganizationGroup;
76+
}
77+
78+
/**
79+
* Sets the value for if the group is an enterprise contact group.
80+
* @param contactGroupIsOrganizationGroup
81+
*/
82+
83+
84+
public void setContactGroupIsOrganizationGroup(boolean contactGroupIsOrganizationGroup) {
85+
this.contactGroupIsOrganizationGroup = contactGroupIsOrganizationGroup;
86+
}
87+
88+
7289
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package com.sendsafely;
2+
3+
import java.util.Collection;
4+
import java.util.List;
5+
6+
import com.sendsafely.dto.Subdirectory;
7+
8+
9+
public class Directory {
10+
private Directory directory;
11+
private String directoryName;
12+
private String directoryId;
13+
private List<File> files;
14+
private Collection<Subdirectory> subDirectories;
15+
16+
public Directory(String directoryId, String directoryName){
17+
this.directoryName = directoryName;
18+
this.directoryId = directoryId;
19+
}
20+
21+
public String getDirectoryId() {
22+
return directoryId;
23+
}
24+
25+
public void setDirectoryId(String directoryId) {
26+
this.directoryId = directoryId;
27+
}
28+
29+
public Directory getDirectory() {
30+
return directory;
31+
}
32+
33+
public void setDirectory(Directory directory) {
34+
this.directory = directory;
35+
}
36+
37+
public String getDirectoryName() {
38+
return directoryName;
39+
}
40+
41+
public void setDirectoryName(String directoryName) {
42+
this.directoryName = directoryName;
43+
}
44+
45+
public List<File> getFiles() {
46+
return files;
47+
}
48+
49+
public void setFiles(List<File> files) {
50+
this.files = files;
51+
}
52+
53+
public Collection<Subdirectory> getSubDirectories() {
54+
return subDirectories;
55+
}
56+
57+
public void setSubDirectories(Collection<Subdirectory> subDirectories) {
58+
this.subDirectories = subDirectories;
59+
}
60+
61+
62+
63+
64+
}

SendSafelyAPI/src/com/sendsafely/File.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* A Java Bean containing information about a file.
55
* Only the Getters should be used from this object, since the server will populate the object.
66
* Updating the setters will not change any state on the server and should be avoided.
7-
* @author Erik Larsson
87
*
98
*/
109
public class File {
@@ -15,6 +14,17 @@ public class File {
1514
//private String createdBy;
1615
private int parts;
1716

17+
public File(String fileId, String fileName, long fileSize, int parts){
18+
this.fileId = fileId;
19+
this.fileName = fileName;
20+
this.fileSize = fileSize;
21+
this.parts = parts;
22+
}
23+
24+
public File() {
25+
// TODO Auto-generated constructor stub
26+
}
27+
1828
/**
1929
* @description Get the unique file ID associated with the file.
2030
* @return
@@ -75,6 +85,7 @@ public void setCreatedBy(String createdBy) {
7585
/**
7686
* @description Returns the number of parts this file is internally split up into when stored on the SendSafely servers.
7787
* @return
88+
* @deprecated
7889
*/
7990
public int getParts() {
8091
return parts;

SendSafelyAPI/src/com/sendsafely/Package.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22

33
import java.util.List;
44

5-
import com.sendsafely.enums.PackageState;
6-
75
/**
86
* A Java Bean containing information about a package.
97
* Only the Getters should be used from this object, since the server will populate the object.
108
* Updating the setters will not change any state on the server and should be avoided.
11-
* @author Erik Larsson
129
*
1310
*/
1411
public class Package extends BasePackage {
@@ -47,8 +44,6 @@ public List<ContactGroup> getContactGroups() {
4744
*/
4845
public void setContactGroups(List<ContactGroup> contactGroups) {
4946
this.contactGroups = contactGroups;
50-
}
51-
52-
47+
}
5348

5449
}

SendSafelyAPI/src/com/sendsafely/PackageReference.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22

33
import java.util.List;
44

5-
import com.sendsafely.enums.PackageState;
6-
75
/**
86
* A Java Bean containing information about a package.
97
* Only the Getters should be used from this object, since the server will populate the object.
108
* Updating the setters will not change any state on the server and should be avoided.
11-
* @author Erik Larsson
129
*
1310
*/
1411
public class PackageReference extends BasePackage {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.sendsafely;
2+
3+
import java.util.List;
4+
5+
public class PackageSearchResults {
6+
7+
List<PackageReference> packages;
8+
boolean capped;
9+
public List<PackageReference> getPackages() {
10+
return packages;
11+
}
12+
public void setPackages(List<PackageReference> packages) {
13+
this.packages = packages;
14+
}
15+
public boolean isCapped() {
16+
return capped;
17+
}
18+
public void setCapped(boolean limit) {
19+
this.capped = limit;
20+
}
21+
}

SendSafelyAPI/src/com/sendsafely/ProgressInterface.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
/**
44
* An interface, which can be implemented to track the progress of the file currently being uploaded.
5-
* @author Erik Larsson
65
*
76
*/
87
public interface ProgressInterface {

SendSafelyAPI/src/com/sendsafely/Recipient.java

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,15 @@
99
* A Java Bean containing information about a recipient.
1010
* Only the Getters should be used from this object, since the server will populate the object.
1111
* Updating the setters will not change any state on the server and should be avoided.
12-
* @author Erik Larsson
1312
*
1413
*/
1514
public class Recipient {
1615

1716
private String recipientId;
1817
private String email;
1918
private boolean needsApproval;
20-
private boolean canAddFiles;
21-
private boolean canAddMessages;
22-
private boolean canAddRecipients;
2319
private List<Confirmation> confirmations = new ArrayList<Confirmation>();
20+
private String role;
2421

2522
/**
2623
* @description Get the unique recipient ID for the object. The recipient ID is unique for every new package. The same user will have different recipient IDs for different packages.
@@ -86,29 +83,13 @@ public List<Confirmation> getConfirmations() {
8683
public void setConfirmations(List<Confirmation> confirmations) {
8784
this.confirmations = confirmations;
8885
}
89-
90-
/*
91-
public boolean canAddFiles() {
92-
return this.canAddFiles;
93-
}
94-
95-
public void setCanAddFiles(boolean canAddFiles) {
96-
this.canAddFiles = canAddFiles;
97-
}
98-
99-
public boolean canAddMessages() {
100-
return this.canAddMessages;
101-
}
102-
103-
public void setCanAddMessages(boolean canAddMessages) {
104-
this.canAddMessages = canAddMessages;
86+
87+
public String getRole() {
88+
return role;
10589
}
106-
107-
public boolean canAddRecipients() {
108-
return this.canAddRecipients;
90+
91+
public void setRole(String roleName) {
92+
this.role = roleName;
10993
}
11094

111-
public void setCanAddRecipients(boolean canAddRecipients) {
112-
this.canAddRecipients = canAddRecipients;
113-
}*/
11495
}

0 commit comments

Comments
 (0)