## 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`.