public final class CoreImpExConstants
extends java.lang.Object
Order and
LinkManager.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CTX_DONT_CHANGE_EXISTING_LINKS
SessionContext property to make link manager skip changing existing links during
LinkManager.setLinkedItems(SessionContext, Item, boolean, String, Language, List). |
static java.lang.String |
IMPORT_MODE
SessionContext property to signal that all item creations or attribute settings
are done by an import process of ImpEx. |
| Constructor and Description |
|---|
CoreImpExConstants() |
public static final java.lang.String CTX_DONT_CHANGE_EXISTING_LINKS
SessionContext property to make link manager skip changing existing links during
LinkManager.setLinkedItems(SessionContext, Item, boolean, String, Language, List). This may be used to boost
performance provided either no links are existing or the user is confident that no update is required.
One example:
// first we create a new item
Product p = ProductManager.getInstance().createProduct("0815");
// now we collect items to link
Collection categories = Arrays.asList(new Object[]
{ CatagoryManager.getInstance().getCategoryByCode("xxx"), CatagoryManager.getInstance().getCategoryByCode("yyy") });
// now tell the link manager that no links need to be updated
SessionContext myCtx = jaloSession.createSessionContext();
myCtx.setAttribute(LinkManager.CTX_DONT_CHANGE_EXITING_LINKS, Boolean.TRUE);
// finally link them together - this works since the 'superCategories' attribute
// is backed by a relation!
p.setAttribute("superCategories", categories);
public static final java.lang.String IMPORT_MODE
SessionContext property to signal that all item creations or attribute settings
are done by an import process of ImpEx. Is this property is set some business logic is deactivated, because the
logic was already done before and only pure data has to be set.Copyright © 2018 SAP SE. All Rights Reserved.