Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
## Update from 1.0.0 to 2.0.0
### Rename
- [ ] Rename the static client getters in ClientFactory from ``getClient`` to `createClient` for:
- `ClientFactory.createSenderClient(config)`
- `ClientFactory.createSubscriberClient(config)`
- `ClientFactory.createRouterClient(config)`
- [ ] Rename the static setters in ReplyChannel from ``ReplyChannel.from`` to `ReplyChannel.of` for:
- `ReplyChannel.ofEmail(...)`
- `ReplyChannel.ofDemail(...)`
- `ReplyChannel.ofFink()`
- `ReplyChannel.ofElster()`
- `ReplyChannel.ofFitConnect()`
- [ ] Rename status method:
- in sender client from ``getStatusForSubmission(...)`` to ``getSubmissionStatus(...)``
- in subscriber client from ``getStatusForSubmission(...)`` to ``getSubmissionStatus(...)``
- change import of return type from ``dev.fitko.**.event.SubmissionStatus`` to ``dev.fitko.**.event.Status``
- [ ] Rename DefaultEnvironments used in ApplicationConfig:
- from ``dev.**.api.config.defaults.DefaultEnvironments`` to ``dev.**.api.config.defaults.Environments``
### 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<b>.client.sender.model.</b>SendableSubmission | dev.fitko.fitconnect<b>.api.domain.sender.</b>SendableSubmission |
| dev.fitko.fitconnect<b>.client.sender.model.</b>SendableEncryptedSubmission | dev.fitko.fitconnect<b>.api.domain.sender.</b>SendableEncryptedSubmission |
| dev.fitko.fitconnect<b>.client.subscriber.</b>ReceivedSubmission | dev.fitko.fitconnect<b>.api.domain.subscriber.</b>ReceivedSubmission |
| dev.fitko.fitconnect<b>.client.sender.model.</b>Attachment | dev.fitko.fitconnect<b>.api.domain.model.attachment.</b>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
````yaml
proxyConfig:
host: "https://proxy.test.net"
port: 8080
````
2.0.0
````yaml
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
````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
````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`.