Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
## API Module
The API-module contains interfaces and domain model value classes that provide the basic functionality to build an
SDK client.
### Structure
- **api.domain** - contains all model classes and domain related POJOs
- **api.exceptions** - all use case specific exceptions thrown by services
- **api.services** - all services to authenticate, encrypt, validate and perform REST-requests
There are two service facade interfaces that provide a client centric wrapper around the underlying services,
- **Sender** - create a submission, announce attachments, encrypt and send the submission including metadata
- **Subscriber** - poll, receive and decrypt submissions and confirm their valid transmission
### Service Architecture
Apart from the ClientFactory the overall service architecture focuses on composition and has no inherited dependencies.
```mermaid
classDiagram
class CryptoService{
+ decryptString
+ decryptBytes
+ encryptString
+ encryptBytes
}
class CertificateValidator{
+ validatePublicKey
}
class MetadataValidator{
+ validateMetadataSchema
+ validateMetadataHashValues
}
class MetadataService{
+ createMetadata
}
class OAuthService{
+ authenticate
}
class SenderFacade {
+ retrieveOAuthToken
+ validatePublicKey
+ encryptSubmissionData
+ encryptAttachment
+ createMetadata
+ createSubmission
+ sendSubmission
+ uploadAttachments
+ createAttachment
+ getEncryptionKeyForDestination
}
class SubscriberFacade {
+ retrieveOAuthToken
+ decryptStringContent
+ pollAvailableSubmissions
+ getSubmission
+ fetchAttachments
+ validateEventLog
+ validateMetadata
+ validateData
+ validateAttachments
+ confirmValidSubmission
}
class SubscriberClient{
SubscriberFacade
}
class SenderClient{
SenderFacade
}
class ClientFactory {
AppplicationConfig
}
ClientFactory ..> SenderClient : Constructs
ClientFactory ..> SubscriberClient : Constructs
SenderClient ..> SenderFacade : Uses
SubscriberClient ..> SubscriberFacade : Uses
SenderFacade ..> CertificateValidator : Uses
SenderFacade ..> MetadataService : Uses
SenderFacade ..> OAuthService : Uses
SenderFacade ..> CryptoService : Uses
SubscriberFacade ..> OAuthService : Uses
SubscriberFacade ..> CryptoService : Uses
SubscriberFacade ..> MetadataValidator : Uses
```