19
19
import javax .xml .bind .annotation .XmlAccessorType ;
20
20
import javax .xml .bind .annotation .XmlElement ;
21
21
import javax .xml .bind .annotation .XmlRootElement ;
22
+ import java .net .URI ;
23
+ import java .time .ZonedDateTime ;
22
24
23
25
@ XmlAccessorType (XmlAccessType .FIELD )
24
26
@ XmlRootElement (name = "user-document" )
@@ -30,6 +32,16 @@ public class Document {
30
32
private String senderName ;
31
33
@ XmlElement
32
34
private Invoice invoice ;
35
+ @ XmlElement
36
+ private String subject ;
37
+ @ XmlElement (name = "delivery-time" )
38
+ private ZonedDateTime deliveryTime ;
39
+ @ XmlElement (name = "read" )
40
+ private Boolean read ;
41
+ @ XmlElement (name = "authentication-level" )
42
+ private String authenticationLevel ;
43
+ @ XmlElement (name = "digipost-uri" )
44
+ private String digipostUri ;
33
45
34
46
private Document () {}
35
47
@@ -50,12 +62,34 @@ public long getId() {
50
62
return id ;
51
63
}
52
64
65
+ public String getSubject () {
66
+ return subject ;
67
+ }
68
+
69
+ public ZonedDateTime getDeliveryTime () {
70
+ return deliveryTime ;
71
+ }
72
+
73
+ public boolean isRead () {
74
+ return read != null && read ;
75
+ }
76
+
77
+ public AuthenticationLevel getAuthenticationLevel () {
78
+ return AuthenticationLevel .valueOf (authenticationLevel );
79
+ }
80
+
81
+ public URI getDigipostUri () {
82
+ return URI .create (digipostUri );
83
+ }
84
+
53
85
@ Override
54
86
public String toString () {
55
87
final StringBuilder sb = new StringBuilder ("Document{" );
56
88
sb .append ("id=" ).append (id );
57
89
sb .append (", senderName='" ).append (senderName ).append ('\'' );
58
90
sb .append (", invoice=" ).append (invoice );
91
+ sb .append (", authenticationLevel=" ).append (authenticationLevel );
92
+ sb .append (", deliveryTime=" ).append (deliveryTime );
59
93
sb .append ('}' );
60
94
return sb .toString ();
61
95
}
0 commit comments