11package com .sendsafely ;
22
3+ import java .util .Date ;
34import java .util .List ;
45
56import 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 */
1415public 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}
0 commit comments