Carbon Copy

No UI

Copies information fields from nodes onto assets when they are assigned to that node. Triggers on Asset release, direct assignment, change value of nodereference field (if configured), change of node metadata (if configured)

Properties

To be configured in {home}/appserver/conf/custom.properties

General Properties

carbonCopy.license

type: String, required: yes, default: -

The license of Carbon Copy provided by brix e.g. `carbonCopy.license=B3Kj3MbcupVIF/zHV2fn0uwmjRpaQ4YcynIjENCxA0l4ncLRYyUZwubIhXKpgW/+baPziK``

carbonCopy.listener.updateAssetsOnNodeUpdate

type: boolean, required: no, default: false

True if changes on a node informationfield should be copied to the informationfields of all assets contained within the node

carbonCopy.task.name

type: String, required: no, default: Carbon Copy: Reapply All Mappings

task name in system tasks menu

carbonCopy.task.groupName

type: String, required: no, default: otherTasks

task group name in system tasks menu

carbonCopy.task.cronExpression

type: Cron expression, required: no, default: -

cron expression for "reapplay all mappings"

Dispatcher Properties

syntax: carbonCopy.{1..n}.{property}, needs to be consecutive, starting at 1 e.g. carbonCopy.1.source=101, carbonCopy.2.target=101

You can use carbonCopy.default.{property} to set a default value for all instances, e.g. carbonCopy.default.nodeTypes=106

carbonCopy.1.source

type: long, required: yes, default: -

ID of the Source InformationField (Information Field of a Node) or name if the source is the node name.

carbonCopy.1.target

type: long, required: if different than source, default: -

ID of the Target InformationField (Information Field of an Asset). Uses source when left empty.

carbonCopy.1.trigger

type: long, required: no, default: -

ID of the Trigger NodeReference Informationfield (optional), the data from the referenced node will be written done to the asset as with direct assignments.

carbonCopy.1.nodeTypes

type: string, required: yes, default: -

List of the affected NodeTypes (comma-separated). When using trigger, use the NodeType of its content (e.g. keywords)

carbonCopy.1.nodes

type: string, required: no, default: -

List of nodeIds. An asset has to be in one of them (recursively), in order to be affected by carbon copy.

With a restricted license, this property will be overwritten by the root nod property defined in the license as rootProperty. E.g. { "licensee": "celum", "product": "carbonCopy", "expires": "2017-12-31T00:00:00Z" "rootProperty": "akeneoConnector.hierarchySync.rootNodeId" }

carbonCopy.1.appendMode

type: string, required: yes, default: -

For any information field type one of:

  • KEEP (set to node value only if asset value is empty, else do nothing)
  • OVERWRITE (overwrite with node value, unless it is empty)
  • FORCE_OVERWRITE (always overwrite with node value, even if it is empty)

For NodeReferencing fields:

  • INTERSECTION
  • UNION

For Boolean fields:

  • OR
  • AND
  • FALSE_AS_NULL (treats a false-value as a null-value and searchs in parent nodes for a true-value)

For Text fields:

  • DELIMIT
carbonCopy.1.delimiter

type: string, required: when using appendMode=DELIMIT, default: -

Only viable with appendMode = DELIMIT, defines the delimiter character. The placeholders <SPACE>, <TAB> and <LINEBREAK> will be replaced with the corresponding whitespace character.

carbonCopy.1.setAssetType

type: long, required: no, default: -

Set asset type before copying the information field value

carbonCopy.1.overwriteAssetType

type: boolean, required: no, default: false

When setAssetType is configured, set that asset type even if the asset already has another

carbonCopy.1.valueTransformer

type: ValueTransformer, required: no, default: -

Value transformer bean id, known values:

  • nodeRefToCheckboxTransformer
  • nodeRefToTextTransformer

Needs to implement the the interface ValueTransformer

package ch.brix.carbonCopy.valueTransformer;

public interface ValueTransformer<SOURCE, TARGET> {
    TARGERT transform(SOURCE value);
}

You can also just instanciate your own beans in the spring/root.xml, e.g.

<bean id="myNodeRefToCheckboxTransformer" class="ch.brix.carbonCopy.valueTransformer.NodeRefToCheckboxTransformer">
    <property name="trueNodeId" value="1337"/>
</bean>
<bean id="myNodeRefToTextTransformer" class="ch.brix.carbonCopy.valueTransformer.NodeRefToTextTransformer">
    <property name="separator" value=" - "/>
</bean>
carbonCopy.1.updateAssetsOnNodeUpdate

type: boolean, required: no, default: true

True if changes on a node informationfield should be copied to the informationfields of all assets contained within the node, for these configurations. Default is true but only has an effect if carbonCopy.listener.updateAssetsOnNodeUpdate is true too.

Compatibility Matrix

carbonCopy CELUM (min. version)
1.0 - 1.2 5.11.4
1.2.6 - 1.4.9 5.12.0
1.3.0 - 1.4.9 5.12.4
1.4.10 - 1.8.1 5.13.1
2.0.0 5.13.3
2.0.1 - 2.5.5 5.13.4 (tested up to 6.8)
2.6.0 - 2.7.0 6.6.0

Release Notes

1.0.0

Released 2016-03-29

  • Initial Version

1.2.7

Released 2016-09-09

  • The copy process can now also be triggered by the setting of node-referencing information fields

1.4.5

Released 2017-01-17

  • The information can now be aggregated along the node hierarchy. If no information is found on the node assigned to the asset, the information on the parent node is searched for until information is found or the root node is reached.

1.8.0

Released 2018-04-12

  • New append mode FORCE_OVERWRITE

2.0.0

Released 2018-07-30

  • Fork that uses CELUM 5.13.3's new Async listeners

2.1.0

Released 2018-11-08

  • Added license
  • Added support for special whitespace chars in delimiter property

2.1.2

Released 2019-03-21

  • New append mode for Checkboxes: FALSE_AS_NULL

2.1.6

Released 2019-08-06

  • New property nodes.

2.2.0

Released 2019-09-09

  • New config property updateAssetsOnNodeUpdate

2.2.1

Released 2020-02-18

  • CELUM 6.4 (19.10) compatible

2.4.0

Released 2021-05-17

  • Restricted license feature (possibility to set the root node property in the license -> carbonCopy.1.nodes will be overwritten by the property set as rootProperty in the license)

2.6.0

Released 2023-12-06

  • Merge tag references

2.7.0

Released 2023-12-08

  • Tag reference fields as trigger fields