Skip to content

Conversation

petervoss2
Copy link

slightly refactor transport plugins to break deprecated abstract services hierarchy

Injection of services and properties does not work correctly along class hierarchy anymore. Therefore, replaced direct injections in abstract classes by protected methods, moved injections into implementations.

This affects everything below com.adobe.cq.commerce.demandware.replication.transport and is only the first step in cleaning things up. Unfortunately reworking this further to replace inheritance by composition would have been well beyond my work assignment. So I left this for the future.

correct bundle categories to better match OSGi standards

Bundle categories where inconsistent and non-standard. Changed them according to OSGi specs.

move logger configuration to sample content and register to a specific run mode

The logger configuration was hurting our own logger config (since loggers for a certain package can only be registered once) and had to be removed on every update of the connector. To simplify deployments I moved it to the sample content package and registered it with run modes author, dwredebuglogs.

add support for custom transformations on content asset page plugin and default values

Changed format of attribute mapping to allow any custom transformer ID apart from i18n and site as the third part and default values in case the property does not exist in page properties (new fourth part of mapping).

add support for sfcc folder based custom attributes

Sfcc can use classification folders to add custom attributes to content assets. These folders are saved in the string array property dwreFolder but the information was only used to set those folders on content assets. They did not influence which attributes were sent to SFCC. This has been changed by introducing a new configuration factory named DwreFolderAttributesAssignment which allows adding and overriding attribute mappings based on sfcc folders.

add two new attribute transformers for string arrays

The transformers so far used Object.toString on output, which resulted in class names for arrays rather than their values. Added transformers with IDs [string] for JSON string arrays and comma-separated-values which joins input values by using the comma , as the separator.

clean up parsing of attribute mappings

The original parsing mechanism did not support simple extension of attributes and needed reparsing of target;converter string on every run. Changed it to using a simple value object.

clean up transformation loop

The loop calling the converters i18n and site was not ready for general extension. Changed the switch statement to a strategy scheme. Strategies can be injected via OSGi means.

add support for relaxed SSL when replication agent tells us so

The relaxed option for SSL connections was ignored by the transport plugins. This prevented us from checking communication via reverse proxies. Added support for this use case and warn in logs if relaxed SSL is enabled.

documentation

I cloned the wiki project and adapted the documentation on how to configure services but cannot check in this documentation with my changes to this project. Could you please let me know how you would like to get the updates to the docu? I would suggest adding the documentation to a docs folder within this project rather than using a project wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants