Skip to content

Commit 79e6c11

Browse files
Updated Documentation and New Features for v3 Release
Updated Documentation and New Features for v3 Release
1 parent 60d3067 commit 79e6c11

19 files changed

+985
-724
lines changed

SendSafelyAPI/lib/commons-io-2.5.jar

204 KB
Binary file not shown.

SendSafelyAPI/src/com/sendsafely/BasePackage.java

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class BasePackage {
3131
private String packageOwner = "";
3232

3333
/**
34+
* @returnType String
3435
* @description The package ID used to identify a given package
3536
* @return The package ID
3637
*/
@@ -47,6 +48,7 @@ public void setPackageId(String packageId) {
4748
}
4849

4950
/**
51+
* @returnType String
5052
* @description Get the server secret. The server secret is unique to a package and is used as part of the encryption key.
5153
* @return The server secret
5254
*/
@@ -63,6 +65,7 @@ public void setServerSecret(String serverSecret) {
6365
}
6466

6567
/**
68+
* @returnType String
6669
* @description The package code is used in the link, sent out to the recipients. It will uniquely identify a package.
6770
* @return the package code
6871
*/
@@ -79,6 +82,7 @@ public void setPackageCode(String packageCode) {
7982
}
8083

8184
/**
85+
* @returnType String
8286
* @description The key code is generated by the Java API when a new package is created. It must be passed into the API when a new file is uploaded and when the package is finalized. The key code is unique for every package.
8387
* @return
8488
*/
@@ -96,8 +100,8 @@ public void setKeyCode(String keyCode) {
96100

97101
/**
98102
* @description Get all files that are currently associated with the package
99-
* @returnType File
100-
* @return
103+
* @returnType List<File>
104+
* @return A list of Files.
101105
*/
102106
public List<File> getFiles() {
103107
return files;
@@ -113,7 +117,8 @@ public void setFiles(List<File> files) {
113117

114118
/**
115119
* @description Returns a list of all potential approvers for the package.
116-
* @return
120+
* @returnType List<String>
121+
* @return A list of string type approvers.
117122
*/
118123
public List<String> getApproverList() {
119124
return approverList;
@@ -129,7 +134,8 @@ public void setApproverList(List<String> approverList) {
129134

130135
/**
131136
* @description Returns true if the package needs approval, false otherwise.
132-
* @return
137+
* @returnType boolean
138+
* @return A boolean representing that the package needs approval.
133139
*/
134140
public boolean getNeedsApproval() {
135141
return needsApproval;
@@ -145,7 +151,8 @@ public void setNeedsApproval(boolean needsApproval) {
145151

146152
/**
147153
* @description Returns the current state of the package.
148-
* @return
154+
* @returnType PackageState
155+
* @return The package state.
149156
*/
150157
public PackageState getState() {
151158
return state;
@@ -161,7 +168,8 @@ public void setState(PackageState state) {
161168

162169
/**
163170
* @description Returns the current state of the package.
164-
* @return
171+
* @returnType PackageStatus
172+
* @return The package status.
165173
*/
166174
public PackageStatus getStatus() {
167175
return status;
@@ -177,7 +185,8 @@ public void setStatus(PackageStatus status) {
177185

178186
/**
179187
* @description Get the number of days the final package will be available for before it expires.
180-
* @return
188+
* @returnType int
189+
* @return the int representing the package life.
181190
*/
182191
public int getLife() {
183192
return life;
@@ -191,6 +200,10 @@ public void setLife(int life) {
191200
this.life = life;
192201
}
193202

203+
/**
204+
* @returnType String
205+
* @return
206+
*/
194207
public String getRootDirectoryId() {
195208
return rootDirectoryId;
196209
}
@@ -199,6 +212,10 @@ public void setRootDirectoryId(String rootDirectoryId) {
199212
this.rootDirectoryId = rootDirectoryId;
200213
}
201214

215+
/**
216+
* @returnType String
217+
* @return
218+
*/
202219
public String getPackageDescriptor() {
203220
return packageDescriptor;
204221
}
@@ -207,6 +224,10 @@ public void setPackageDescriptor(String packageDescriptor) {
207224
this.packageDescriptor = packageDescriptor;
208225
}
209226

227+
/**
228+
* @returnType boolean
229+
* @return
230+
*/
210231
public boolean getIsWorkspace() {
211232
return isWorkspace;
212233
}
@@ -215,6 +236,10 @@ public void setIsWorkspace(boolean isWorkspace) {
215236
this.isWorkspace = isWorkspace;
216237
}
217238

239+
/**
240+
* @returnType Date
241+
* @return
242+
*/
218243
public Date getPackageTimestamp() {
219244
return packageTimestamp;
220245
}
@@ -223,6 +248,10 @@ public void setPackageTimestamp(Date packageTimestamp) {
223248
this.packageTimestamp = packageTimestamp;
224249
}
225250

251+
/**
252+
* @returnType String
253+
* @return
254+
*/
226255
public String getPackageOwner() {
227256
return packageOwner;
228257
}

SendSafelyAPI/src/com/sendsafely/ContactGroup.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public class ContactGroup {
2121

2222
/**
2323
* @description Get the contact group id
24+
* @returnType String
2425
* @return contactGroupId The id representation of the contact group.
2526
*/
2627
public String getContactGroupId() {
@@ -37,7 +38,8 @@ public void setContactGroupId(String contactGroupId) {
3738

3839
/**
3940
* @description Get the contact group Name
40-
* @return contactGroupName
41+
* @returnType String
42+
* @return A string of contactGroupName
4143
*/
4244
public String getContactGroupName() {
4345
return contactGroupName;
@@ -53,7 +55,8 @@ public void setContactGroupName(String contactGroupName) {
5355

5456
/**
5557
* @description Get a list of users
56-
* @return List<Map<String,String>> users
58+
* @returnType List<ContactGroupMember>
59+
* @return A list of ContactGrouMember.
5760
*/
5861
public List<ContactGroupMember> getContactGroupMembers() {
5962
return users;
@@ -69,6 +72,7 @@ public void setContactGroupMembers(List<ContactGroupMember> users) {
6972

7073
/**
7174
* @description Gets the status of if it's an enterprise contact group.
75+
* @returnType boolean
7276
* @return is enterprise contact group
7377
*/
7478
public boolean getContactGroupIsOrganizationGroup() {
@@ -79,8 +83,6 @@ public boolean getContactGroupIsOrganizationGroup() {
7983
* Sets the value for if the group is an enterprise contact group.
8084
* @param contactGroupIsOrganizationGroup
8185
*/
82-
83-
8486
public void setContactGroupIsOrganizationGroup(boolean contactGroupIsOrganizationGroup) {
8587
this.contactGroupIsOrganizationGroup = contactGroupIsOrganizationGroup;
8688
}

SendSafelyAPI/src/com/sendsafely/Directory.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ public Directory(String directoryId, String directoryName){
1818
this.directoryId = directoryId;
1919
}
2020

21+
/**
22+
* @returnType String
23+
* @return
24+
*/
2125
public String getDirectoryId() {
2226
return directoryId;
2327
}
@@ -26,6 +30,10 @@ public void setDirectoryId(String directoryId) {
2630
this.directoryId = directoryId;
2731
}
2832

33+
/**
34+
* @returnType Directory
35+
* @return
36+
*/
2937
public Directory getDirectory() {
3038
return directory;
3139
}
@@ -34,6 +42,10 @@ public void setDirectory(Directory directory) {
3442
this.directory = directory;
3543
}
3644

45+
/**
46+
* @returnType String
47+
* @return
48+
*/
3749
public String getDirectoryName() {
3850
return directoryName;
3951
}
@@ -42,6 +54,10 @@ public void setDirectoryName(String directoryName) {
4254
this.directoryName = directoryName;
4355
}
4456

57+
/**
58+
* @returnType List<File>
59+
* @return
60+
*/
4561
public List<File> getFiles() {
4662
return files;
4763
}
@@ -50,6 +66,10 @@ public void setFiles(List<File> files) {
5066
this.files = files;
5167
}
5268

69+
/**
70+
* @returnType Collection<Subdirectory>
71+
* @return
72+
*/
5373
public Collection<Subdirectory> getSubDirectories() {
5474
return subDirectories;
5575
}

SendSafelyAPI/src/com/sendsafely/File.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public File() {
2727

2828
/**
2929
* @description Get the unique file ID associated with the file.
30-
* @return
30+
* @returnType String
31+
* @return A string representing File Id.
3132
*/
3233
public String getFileId() {
3334
return fileId;
@@ -43,7 +44,8 @@ public void setFileId(String fileId) {
4344

4445
/**
4546
* @description Get the filename associated with the file.
46-
* @return
47+
* @returnType String
48+
* @return A string representing File Name.
4749
*/
4850
public String getFileName() {
4951
return fileName;
@@ -59,7 +61,8 @@ public void setFileName(String fileName) {
5961

6062
/**
6163
* @description Get the file size for the unencrypted file.
62-
* @return
64+
* @returnType long
65+
* @return A long representing File Size.
6366
*/
6467
public long getFileSize() {
6568
return fileSize;

SendSafelyAPI/src/com/sendsafely/Package.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class Package extends BasePackage {
1515
private List<ContactGroup> contactGroups;
1616
/**
1717
* @description Get all recipients that are currently associated with the package
18-
* @returnType Recipient
19-
* @return
18+
* @returnType List<Recipient>
19+
* @return A list of recipients.
2020
*/
2121
public List<Recipient> getRecipients() {
2222
return recipients;
@@ -32,7 +32,8 @@ public void setRecipients(List<Recipient> recipients) {
3232

3333
/**
3434
* @description Set internally by the API.
35-
* @return
35+
* @returnType List<ContactGroup>
36+
* @return A list of contact groups.
3637
*/
3738
public List<ContactGroup> getContactGroups() {
3839
return contactGroups;

SendSafelyAPI/src/com/sendsafely/PackageReference.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class PackageReference extends BasePackage {
1515

1616
/**
1717
* @description Get all recipients that are currently associated with the package
18-
* @returnType Email
19-
* @return
18+
* @returnType List<String>
19+
* @return A list of recipient emails.
2020
*/
2121
public List<String> getRecipients() {
2222
return recipients;
@@ -32,8 +32,8 @@ public void setRecipients(List<String> recipients) {
3232

3333
/**
3434
* @description Get all contactGroup names that are currently associated with the package
35-
* @returnType contactGroupName
36-
* @return
35+
* @returnType List<String>
36+
* @return A list of contact group names.
3737
*/
3838
public List<String> getContactGroupNames() {
3939
return contactGroupNames;

SendSafelyAPI/src/com/sendsafely/PackageSearchResults.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ public class PackageSearchResults {
66

77
List<PackageReference> packages;
88
boolean capped;
9+
10+
/**
11+
* @returnType List<PackageReference>
12+
* @return
13+
*/
914
public List<PackageReference> getPackages() {
1015
return packages;
1116
}
1217
public void setPackages(List<PackageReference> packages) {
1318
this.packages = packages;
1419
}
20+
21+
/**
22+
* @returnType boolean
23+
* @return
24+
*/
1525
public boolean isCapped() {
1626
return capped;
1727
}

0 commit comments

Comments
 (0)