Class DefaultMulticountryCMSItemFacadeIntegrationTest

    • Field Detail

      • NEWLY_CREATED_SLOT_NAME

        public static java.lang.String NEWLY_CREATED_SLOT_NAME
      • GLOBAL_SEARCH_BOX_SLOT_ID

        public static java.lang.String GLOBAL_SEARCH_BOX_SLOT_ID
      • GLOBAL_SEARCH_BOX_SLOT_POSITION

        public static java.lang.String GLOBAL_SEARCH_BOX_SLOT_POSITION
      • GLOBAL_CATALOG_NAME

        public static java.lang.String GLOBAL_CATALOG_NAME
      • REGION_CATALOG_NAME

        public static java.lang.String REGION_CATALOG_NAME
      • LOCAL_CATALOG_NAME

        public static java.lang.String LOCAL_CATALOG_NAME
      • LOCAL_HOMEPAGE

        public static java.lang.String LOCAL_HOMEPAGE
      • LOCAL_ANOTHER_PAGE

        public static java.lang.String LOCAL_ANOTHER_PAGE
      • ONLINE_CATALOG_VERSION

        public static java.lang.String ONLINE_CATALOG_VERSION
      • STAGED_CATALOG_VERSION

        public static java.lang.String STAGED_CATALOG_VERSION
    • Constructor Detail

      • DefaultMulticountryCMSItemFacadeIntegrationTest

        public DefaultMulticountryCMSItemFacadeIntegrationTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getItemSyncData

        protected ItemSynchronizationData getItemSyncData​(java.lang.String uid,
                                                          java.lang.String catalogId,
                                                          java.lang.String catalogVersion,
                                                          java.lang.String itemType)
      • componentsBelongToCatalogVersion

        protected boolean componentsBelongToCatalogVersion​(java.util.List<java.lang.String> componentUuids,
                                                           java.lang.String catalog,
                                                           java.lang.String catalogVersion)
        Verifies whether the each uuid in the list belongs to provided catalog version. This method used to verify that compoents were cloned (or referenced) and a new slot.
        Parameters:
        componentUuids - the list of component uuids
        catalog - the catalog
        catalogVersion - the catalog version
        Returns:
        true if all uuids belongs to provided catalog version, false otherwise.
      • getUuid

        protected java.lang.String getUuid​(java.lang.String uid,
                                           java.lang.String catalogId,
                                           java.lang.String catalogVersion)
        Converts uid, catalog and catalog version to uuid.
        Parameters:
        uid - the id of the item
        catalogId - the catalog
        catalogVersion - the catalog version
        Returns:
        the uuid
      • preparePayloadForNewSlot

        protected java.util.Map<java.lang.String,​java.lang.Object> preparePayloadForNewSlot​(java.lang.String slotName,
                                                                                                  java.lang.Boolean isSlotCustom,
                                                                                                  java.lang.String sourceSlotUUID,
                                                                                                  CloneAction cloneAction)
        Prepares payload for a new slot
        Parameters:
        slotName - the slot name
        isSlotCustom - whether the slot is custom or not (local)
        sourceSlotUUID - the source slot that will be overridden
        cloneAction - action that says what to do with components inside (clone, reference, remove)
        Returns:
        the payload for a new slot
      • setEnv

        protected void setEnv()
        Sets the environment
      • getNewCreatedContentDataSlotForPage

        protected java.util.Optional<PageContentSlotData> getNewCreatedContentDataSlotForPage​(java.lang.String pageName,
                                                                                              java.lang.String slotUid)
                                                                                       throws CMSItemNotFoundException
        Retrieves the list of content slots (PageContentSlotData) for provided page and finds there a slot with provided uid.
        Parameters:
        pageName - the page name for which the list of slots will be retrieved.
        slotUid - the slot id that needs to be in the list of page slots
        Returns:
        the slot that matches the provided uid or nothing. The result is wrapped in Optional.
        Throws:
        CMSItemNotFoundException