support sfcc folder based custom attributes and custom attribute transformations on page attributes of content assets #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andsite
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 namedDwreFolderAttributesAssignment
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 andcomma-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
andsite
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.