Skip to content
pCon.configurator onlineDocumentation
Esc
↑↓navigate↵open⌘Jpreview
On this page

relocateItems

Synopsis

RelocateItemsResult[] relocateItems(SessionId sessionId,
    BItemId fatherId,
    BItemId beforeId,
    BItemId[]           itemIds,
    RelocateItemsOptions *options)
throws BasketServiceFault;

See also: RelocateItemsResult, SessionId, BItemId, RelocateItemsOptions, BasketServiceFault

Move specified list of items to new position in basket item tree.

The new position of the moved items is specified by fatherId and beforeId. They become children of the item identified by the father ID, and are inserted into the list of the father’s children immediately before the item identified by beforeId, unless beforeId is either the NIL ID, or identifies an item that is not a child of the father, in which case they are appended to the list of children.

The items to move, and their order once they have been moved, is specified by itemIds. As the order is significant, duplicate item IDs are not allowed.

In general, the specified items are moved together with all their descendants (i.e. whole sub-trees are moved). The option flat (false by default) controls the behavior if one of the items to move is a descendant of another item to move (the ancestor). If true, the sub-tree rooted at the descendant will be moved to the father. If false, the descendant will be moved as part of the sub-tree rooted at the ancestor.

If option doNotModify (false by default) is true, the final step of moving the items is suppressed. Other than that, the operation behaves exactly the same way as with this option set to false, including returning the same result and throwing the same exceptions, unless they occur during the actual move of the items (which should not happen).

Parameters:

fatherId

the ID of the new father

beforeId

the insert position within the list of children of the new father, or a NIL UUID (either an empty string or an UUID consisting of all zero)

itemIds

the list of IDs of the items to move

options

the options that affect the behavior of the operation; If missing, or if one of the option values is missing, the default value will be used.

The operation returns an enumeration value that indicates whether or not items have been moved, and if not, why they haven’t been moved