Newer
Older
The API-module contains interfaces and domain model value classes that provide the basic functionality to build a sdk-client.
- **api.config** - sdk wide configuration and settings
- **api.domain** - contains all model classes and domain related pojos
- **api.exceptions** - all use case specific the services throw
- **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
+ decryptString
+ decryptBytes
+ encryptString
+ encryptBytes
}
class SchemaProvider{
+ isAllowedSetSchema
+ isAllowedMetadataSchema
+ loadLatestSetSchema
+ loadMetadataSchema
}
class EventLogService{
+ getEventLog
+ sendEvent
}
class EventLogVerificationService {
+ validateEventLogs
}
+ getDestination
+ announceSubmission
+ getSubmission
+ sendSubmission
+ pollAvailableSubmissions
+ uploadAttachment
+ getAttachment
}
class SecurityEventService{
+ createAcceptSubmissionEvent
+ createRejectSubmissionEvent
}
+ createHash
+ verify
+ getPublicEncryptionKey
+ getPublicSignatureKey
+ getPortalSignatureKey
+ getSubmissionServiceSignatureKey
class ValidationService{
+ validatePublicKey
+ validateMetadataSchema
+ validateIntegrity
}
class OAuthService{
+ getCurrentToken
+ encryptBytes
+ encryptObject
+ createHash
+ uploadAttachment
+ validateJsonFormat
+ validateXmlFormat
+ getEventLog
+ gelatestEvent
+ getDestination
+ getEncryptionKeyForDestination
+ decryptStringContent
+ pollAvailableSubmissions
+ getSubmission
+ fetchAttachment
+ validateHashIntegrity
+ rejectSubmission
class SubscriberClient{
SubscriberFacade
}
class SenderClient{
SenderFacade
}
class ClientFactory {
ApplicationConfig
}
ClientFactory ..> SenderClient : Constructs
ClientFactory ..> SubscriberClient : Constructs
SenderClient ..> SenderFacade : Uses
SubscriberClient ..> SubscriberFacade : Uses
SubscriberFacade ..> SubmissionService : Uses
SubscriberFacade ..> CryptoService : Uses
SubscriberFacade ..> EventLogService : Uses
SubscriberFacade ..> SecurityEventService : Uses
SubscriberFacade ..> ValidationService : Uses
SenderFacade ..> SubmissionService : Uses
SenderFacade ..> CryptoService : Uses
SenderFacade ..> KeyService : Uses
SenderFacade ..> EventLogService : Uses
SenderFacade ..> ValidationService : Uses
SubmissionService ..> OAuthService : Uses
EventLogService ..> OAuthService : Uses
EventLogService ..> EventLogVerificationService : Uses
EventLogVerificationService ..> KeyService : Uses
EventLogVerificationService ..> ValidationService : Uses
CryptoService ..> MessageDigestService : Uses
ValidationService ..> MessageDigestService : Uses
ValidationService ..> SchemaProvider : Uses
SecurityEventService ..> ValidationService : Uses
KeyService ..> OAuthService : Uses
KeyService ..> SubmissionService : Uses