Copy Structure Groups

/*<![CDATA[*/ div.rbtoc1659621429447 {padding: 0px;} div.rbtoc1659621429447 ul {list-style: disc;margin-left: 0px;} div.rbtoc1659621429447 li {margin-left: 0px;padding-left: 0px;} /*]]>*/

General Information

Extension Points: none

API classes: none

Copy structure groups

StructureGroups are copied in the StructureGroupCopyProcessor. There is no RequestHandler as there is for StructureAttributes and StructureValues.

The copy logic recursively steps through the structureGroup which should be copied and all its children. To copy a structureGroup the structureGroupManager.createItem() is used. InitProperties for this are values for the fields

  • StructureGroup.StructureProxy

  • StructureGroupType.StructureId

  • StructureGroup.Parent (There is a new StructureGroupParentPostSetter setting StructureGroupType.ParentId and StructureGroupType.ParentIdentifier automatically when the parent proxy is set)

Next all fields are copied using StructureGroupCopy.copyStructureGroup(). The following fields and subentities are omitted

  • domainValues - This is the calculated field in the languageSpecificData containing the labels of the presetValues

  • id

  • revisionId

  • left

  • right

  • parentId - Set (indirectly) in the init properties and different to the source

  • parent - Set in the init properties and different to the source

  • structureId - Set in the init properties and maybe different to the source

  • structureProxy - Set in the init properties and maybe different to the source

  • parentIdentifier - Set (indirectly) in the init properties and maybe different to the source

  • level

  • status - Each object has a 1:1 relationship to a status object, so they are not copied.

  • deletionDate

  • lastModified

  • subentity: logs

StructureGroupCopy.copyStructureGroup() also handles the following adjustments:

  • generates a new identifier if necessary

  • filters invalid structureGroup mappings

  • handles the copy of MediaAssets

  • adjusts structureValue proxies and structureAttribute proxies and identifier

After a structure group is copied the acls are adjusted using the UpdateAclInheritance RequestHandler.

The new identifier

Compared to PIM 7 the creation of the identifier for a new structure Attribute changed.

If the identifier of the source structure attribute isn't already taken in the target structure, the copy will get the identifier of the source structure groups.

Otherwise it will get a new identifier. A new identifier will have the format: <generatedId>_<identifier of the source structure attribute>. This identifier will be cut on the right hand side to fit the max length of the identifier field.

Handling of Acls/Object Rights

First AclProxy and AclFlag are copied, next the UpdateAclInheritance Request Handler is called. If for example a structureGroup is copied to another structure group with Object rights, so that this structure group becomes the parent, the object rights might have to be inherited to the copied structure group. For more information see Inheritance of Acls

Handling of DisplayOrders

When copying a structureGroup, only the displayOrder of the top structureGroup (i. e. the one you selected to copy) is adjusted. Child groups keep their displayOrder.

For more information on the generation algorithm of a new displayOrder see Handling of DisplayOrders - A comparison

Adjustment of hierarchical numbers

Hierarchical numbers aren't adjusted at all. This is a known problem. If you/your customer runs into problems with hierarchical numbers please talk to PM about the expected behaviour and file a JIRA issue.