Skip to content
Snippets Groups Projects
README.md 4.87 KiB
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

Martin Vogel's avatar
Martin Vogel committed
The service facade interface FitConnectService is a client centric wrapper around the underlying services for sender, subscriber and router client :
Martin Vogel's avatar
Martin Vogel committed
##### Sender
- create a submission, announce attachments, encrypt and send the submission including metadata
- validate metadata and data to send
- poll status of submissions 
- receive replies

##### Subscriber 
- poll, receive and decrypt submissions and confirm their valid transmission
- validate received metadata and data
- poll status of submissions and replies
- send replies for existing submissions within a case

##### Router
- find areas based on e.g. a zip code or city
- find destinations based on leika key and area
- validate routing information (destination key, destinationSignature, etc.)

### 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 SchemaProvider{
    + isAllowedSetSchema
    + isAllowedMetadataSchema
    + loadLatestSetSchema
    + loadMetadataSchema
}

Martin Vogel's avatar
Martin Vogel committed
class CaseService{
    + getEventLog
Martin Vogel's avatar
Martin Vogel committed
    + listCases
    + getCase
    + getAuthenticationTags
    + sendEvent
Martin Vogel's avatar
Martin Vogel committed
    + getStatus
    + getSubmissionSubmitState
}

class EventLogVerificationService {
    + validateEventLogs
}
class SubmissionService{
    + announceSubmission
    + getSubmission
    + sendSubmission
    + pollAvailableSubmissions
    + uploadAttachment
    + getAttachment
}
class SecurityEventService{
    + createAcceptSubmissionEvent
    + createRejectSubmissionEvent
}
class MessageDigestService{
Martin Vogel's avatar
Martin Vogel committed
class ReplyService{
    + announceReply
    + submitReply
    + getReply
    + getAvailableReplies
    + acceptReply
    + rejectReply
    + uploadAttachment
    + getAttachment
}

class KeyService{
    + getPublicEncryptionKey
    + getPublicSignatureKey
    + getPortalSignatureKey
    + getSubmissionServiceSignatureKey
Martin Vogel's avatar
Martin Vogel committed
class RoutingService{
    + getAreas
    + getRoutes
}

class RoutingVerificationService{
    + validateRouteDestinations
}


class ValidationService{
    + validatePublicKey
    + validateMetadataSchema
    + validateIntegrity
}

class OAuthService{
Martin Vogel's avatar
Martin Vogel committed
class FitConnectService {
    + validateMetadata
    + validateJsonFormat
    + validateXmlFormat
    + getEventLog
    + gelatestEvent
    + getEncryptionKeyForDestination
    + sendSubmission
    + decryptStringContent
    + pollAvailableSubmissions
    + getSubmission
    + getEventLog
    + acceptSubmission
Martin Vogel's avatar
Martin Vogel committed
    + listCases
    + getCase
    + getReply
    + getAvailableReplies
    + uploadReplyAttachment
    + getReplyAttachment
    + submitReply
    + announceReply
    + acceptReply
    + rejectReply
    + getSubmitState
}


class ClientFactory {
    ApplicationConfig
}
 
ClientFactory  ..> SenderClient : Constructs
ClientFactory  ..> SubscriberClient : Constructs
Martin Vogel's avatar
Martin Vogel committed
ClientFactory  ..> RouterClient : Constructs

SenderClient ..> FitConnectService : Uses
SubscriberClient ..> FitConnectService : Uses
RouterClient ..> RoutingService : Uses
RouterClient ..> RoutingVerificationService : Uses

FitConnectService ..> ReplyService : Uses
FitConnectService ..> CryptoService : Uses
FitConnectService ..> CaseService : Uses
FitConnectService ..> SecurityEventService : Uses
FitConnectService ..> ValidationService : Uses
FitConnectService ..> SubmissionService : Uses
FitConnectService ..> KeyService : Uses
FitConnectService ..> ValidationService : Uses
Martin Vogel's avatar
Martin Vogel committed
KeyService ..> OAuthService : Uses
SubmissionService ..> OAuthService : Uses
Martin Vogel's avatar
Martin Vogel committed
ReplyService ..> OAuthService : Uses
CaseService ..> OAuthService : Uses
Martin Vogel's avatar
Martin Vogel committed
CaseService ..> EventLogVerificationService : Uses
Martin Vogel's avatar
Martin Vogel committed
RoutingVerificationService ..> KeyService : Uses
EventLogVerificationService ..> KeyService : Uses

CryptoService ..> MessageDigestService : Uses
ValidationService ..> MessageDigestService : Uses
ValidationService ..> SchemaProvider : Uses

Martin Vogel's avatar
Martin Vogel committed
EventLogVerificationService ..> ValidationService : Uses
RoutingVerificationService ..> ValidationService : Uses
SecurityEventService ..> ValidationService : Uses
KeyService ..> ValidationService : Uses