on ‎2016 Jul 19 9:48 AM
Is it possible to exclude an attribute from synchronization programmatically? So that I don't need to adjust the synchronization properties manually in hmc.
The attributes must not be synchronized through CMS Cockpit nor through hmc. Also the sync marker in CMS Cockpit must not change to red when changing that attribute.
In my case it's a Date and an Enum.
My ideas so far:
Outsource them with a relation and don't add that relation to cmscockpit-services.xml.
Extend SynchronizationService with a attribute blacklist.
I don't like that solutions. Is there a more straight forward way?
Request clarification before answering.
As explained by the sync marker in CMS Cockpit works on type level. Therefore it's not possible to exclude attributes without much effort.
We ended up creating a new item type with the attributes that are not relevant for synchronization.
This new item type has an attribute which points back to the original item type. You can't do it the other way around, else it would be synced of course, and relations cannot be 1-to-1.
Optionally one could create dynamic attributes on the original item type, which will retrieve the outsourced values.
We use an Init Defaults Interceptor to make sure the additional item gets created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.