API Module
The API-module contains interfaces and domain model value classes that provide the basic functionality to build a sdk-client.
Structure
- 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.
Warning: Displaying this diagram might cause performance issues on this page.
classDiagram
class CryptoService{
+ decryptString
+ decryptBytes
+ encryptString
+ encryptBytes
}
class SchemaProvider{
+ isAllowedSetSchema
+ isAllowedMetadataSchema
+ loadLatestSetSchema
+ loadMetadataSchema
}
class EventLogService{
+ getEventLog
+ sendEvent
}
class EventLogVerificationService {
+ validateEventLogs
}
class SubmissionService{
+ getDestination
+ announceSubmission
+ getSubmission
+ sendSubmission
+ pollAvailableSubmissions
+ uploadAttachment
+ getAttachment
}
class SecurityEventService{
+ createAcceptSubmissionEvent
+ createRejectSubmissionEvent
}
class MessageDigestService{
+ createHash
+ verify
}
class KeyService{
+ getPublicEncryptionKey
+ getPublicSignatureKey
+ getPortalSignatureKey
+ getSubmissionServiceSignatureKey
}
class ValidationService{
+ validatePublicKey
+ validateMetadataSchema
+ validateIntegrity
}
class OAuthService{
+ getCurrentToken
}
class SenderFacade {
+ validatePublicKey
+ validateMetadata
+ encryptBytes
+ encryptObject
+ createHash
+ createSubmission
+ uploadAttachment
+ validateJsonFormat
+ validateXmlFormat
+ getEventLog
+ gelatestEvent
+ getDestination
+ getEncryptionKeyForDestination
+ sendSubmission
}
class SubscriberFacade {
+ decryptStringContent
+ pollAvailableSubmissions
+ getSubmission
+ fetchAttachment
+ getEventLog
+ validateMetadata
+ validateHashIntegrity
+ acceptSubmission
+ 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 ..> ValidationService : Uses
KeyService ..> OAuthService : Uses
KeyService ..> SubmissionService : Uses