dev.fitko.fitconnect.api.README.md Maven / Gradle / Ivy
## 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
The service facade interface FitConnectService is a client centric wrapper around the underlying services for sender, subscriber and router client :
##### 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
}
class CaseService{
+ getEventLog
+ listCases
+ getCase
+ getAuthenticationTags
+ sendEvent
+ getStatus
+ getSubmissionSubmitState
}
class EventLogVerificationService {
+ validateEventLogs
}
class SubmissionService{
+ getDestination
+ announceSubmission
+ getSubmission
+ sendSubmission
+ pollAvailableSubmissions
+ uploadAttachment
+ getAttachment
}
class SecurityEventService{
+ createAcceptSubmissionEvent
+ createRejectSubmissionEvent
}
class MessageDigestService{
+ createHash
+ verify
}
class ReplyService{
+ announceReply
+ submitReply
+ getReply
+ getAvailableReplies
+ acceptReply
+ rejectReply
+ uploadAttachment
+ getAttachment
}
class KeyService{
+ getPublicEncryptionKey
+ getPublicSignatureKey
+ getPortalSignatureKey
+ getSubmissionServiceSignatureKey
}
class RoutingService{
+ getAreas
+ getRoutes
}
class RoutingVerificationService{
+ validateRouteDestinations
}
class ValidationService{
+ validatePublicKey
+ validateMetadataSchema
+ validateIntegrity
}
class OAuthService{
+ getCurrentToken
}
class FitConnectService {
+ validatePublicKey
+ validateMetadata
+ encryptBytes
+ encryptObject
+ createHash
+ createSubmission
+ uploadAttachment
+ validateJsonFormat
+ validateXmlFormat
+ getEventLog
+ gelatestEvent
+ getDestination
+ getEncryptionKeyForDestination
+ sendSubmission
+ decryptStringContent
+ pollAvailableSubmissions
+ getSubmission
+ fetchAttachment
+ getEventLog
+ validateMetadata
+ validateHashIntegrity
+ acceptSubmission
+ rejectSubmission
+ listCases
+ getCase
+ getReply
+ getAvailableReplies
+ uploadReplyAttachment
+ getReplyAttachment
+ submitReply
+ announceReply
+ acceptReply
+ rejectReply
+ getSubmitState
}
class ClientFactory {
ApplicationConfig
}
ClientFactory ..> SenderClient : Constructs
ClientFactory ..> SubscriberClient : Constructs
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
KeyService ..> OAuthService : Uses
SubmissionService ..> OAuthService : Uses
ReplyService ..> OAuthService : Uses
CaseService ..> OAuthService : Uses
CaseService ..> EventLogVerificationService : Uses
RoutingVerificationService ..> KeyService : Uses
EventLogVerificationService ..> KeyService : Uses
CryptoService ..> MessageDigestService : Uses
ValidationService ..> MessageDigestService : Uses
ValidationService ..> SchemaProvider : Uses
EventLogVerificationService ..> ValidationService : Uses
RoutingVerificationService ..> ValidationService : Uses
SecurityEventService ..> ValidationService : Uses
KeyService ..> ValidationService : Uses
KeyService ..> SubmissionService : Uses
```
© 2015 - 2025 Weber Informatics LLC | Privacy Policy