Class CoreImpExConstants


  • public final class CoreImpExConstants
    extends java.lang.Object
    Specifies constants for ImpEx module which are also used by classes of core module, especially Order and LinkManager.
    • Field Summary

      Fields 
      Modifier and Type Field 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.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CTX_DONT_CHANGE_EXISTING_LINKS

        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);
         
        See Also:
        Constant Field Values
      • IMPORT_MODE

        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.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CoreImpExConstants

        public CoreImpExConstants()