-
Martin Vogel authoredMartin Vogel authored
Update from 1.0.0 to 2.0.0
Rename
-
Rename the static client getters in ClientFactory from
getClient
tocreateClient
for:ClientFactory.createSenderClient(config)
ClientFactory.createSubscriberClient(config)
ClientFactory.createRouterClient(config)
-
Rename the static setters in ReplyChannel from
ReplyChannel.from
toReplyChannel.of
for:ReplyChannel.ofEmail(...)
ReplyChannel.ofDemail(...)
ReplyChannel.ofFink()
ReplyChannel.ofElster()
ReplyChannel.ofFitConnect()
-
Rename status method:
- in sender client from
getStatusForSubmission(...)
togetSubmissionStatus(...)
- in subscriber client from
getStatusForSubmission(...)
togetSubmissionStatus(...)
- change import of return type from
dev.fitko.**.event.SubmissionStatus
todev.fitko.**.event.Status
- in sender client from
-
Rename DefaultEnvironments used in ApplicationConfig:
- from
dev.**.api.config.defaults.DefaultEnvironments
todev.**.api.config.defaults.Environments
- from
Fix imports
Several model classes have been moved to the API module. Therefore, the imports of the following classes have to be adjusted:
1.0.0 | 2.0.0 |
---|---|
dev.fitko.fitconnect.client.sender.model.SendableSubmission | dev.fitko.fitconnect.api.domain.sender.SendableSubmission |
dev.fitko.fitconnect.client.sender.model.SendableEncryptedSubmission | dev.fitko.fitconnect.api.domain.sender.SendableEncryptedSubmission |
dev.fitko.fitconnect.client.subscriber.ReceivedSubmission | dev.fitko.fitconnect.api.domain.subscriber.ReceivedSubmission |
dev.fitko.fitconnect.client.sender.model.Attachment | dev.fitko.fitconnect.api.domain.model.attachment.Attachment |
Adjust configuration (for optional settings)
There are two changes in the configuration of the ApplicationConfig. Both changes apply to the yaml config and the ApplicationConfig builder.
ProxyConfig
The config key proxyConfig
moved from top-level to a new httpConfig
. Please adjust your config.yml:
1.0.0
proxyConfig:
host: "https://proxy.test.net"
port: 8080
2.0.0
httpConfig:
timeouts:
readTimeout: 60
writeTimeout: 60
proxyConfig:
host: "https://proxy.test.net"
port: 8080
Local Data Schemas
Instead of setting th path submissionDataSchemaPath
, in version 2.0.0 the local data schemas need be explicitly
mapped from an arbitrary key to a path value of the schema file. This enables to use any schema for data validation independent form the
internal structure. In version 1.0.0 the id
value of the schema was parsed and mapped against the schema file, which is not suitable for any other schema in a different format or not having an id in json.
YAML
submissionDataSchemas:
"https://json-schema.uri.test.net": "/path/to/schema/file.json"
"https://xml-schema.uri.test.net": "/path/to/schema/file.xml"
"urn:test:xml:schema": "/path/to/schema/urn-schema.xml"
Java
var submissionDataSchemas = Map.of(
"https://json-schema.uri.test.net", "/path/to/schema/file.json",
"https://xml-schema.uri.test.net", "/path/to/schema/file.xml",
"urn:test:xml:schema", "/path/to/schema/urn-schema.xml"
);
var config = ApplicationConfig.builder()
.submissionDataSchemas(submissionDataSchemas)
.build();
Deprecations
The static attachment method Attachment.fromString()
was deprecated for sdk version 3.0.0
.
It can lead to character encoding issues when used incorrectly, e.g. when an entire file is passed as string.
Please use Attachment.fromByteArray
or Attachment.fromInputStream
.