com.ibm.commerce.pagelayout.dataload.mediator

Class AbstractBasePageLayoutMediator

    • Constructor Detail

      • AbstractBasePageLayoutMediator

        public AbstractBasePageLayoutMediator()
    • Method Detail

      • init

        public void init()
                  throws DataLoadException
        This method performs initialization for the page layout mediator Initialization tasks include:
        • Retrieve and set resolved context data from context services. Context data includes: StoreId, ownerId and languageId
        Specified by:
        init in interface BusinessObjectMediator
        Overrides:
        init in class AbstractBusinessObjectMediator
        Throws:
        DataLoadException - An application exception will be thrown if there was a problem retrieving the business contexts.
      • close

        public void close()
                   throws DataLoadException

        This method will perform cleanup on the business object mediator. It will attempt to close all of the data writers configured for this business object mediator.

        This method will flush and commit any data waiting to be persisted in the batch as well as clear the ID resolver cache.

        Specified by:
        close in interface BusinessObjectMediator
        Overrides:
        close in class AbstractBusinessObjectMediator
        Throws:
        DataLoadException - An application exception will be thrown if there was a problem closing the business object mediator or its data writers.
      • resolveStoreIDByStoreIdentifierType

        public static java.lang.Integer resolveStoreIDByStoreIdentifierType(StoreIdentifierType storeIdentifierType)
                                                                     throws DataLoadApplicationException
        Resolves the store id (STOREENT_ID column of STOREENT table) according to store identifier noun part (StoreIdentifierType). If StoreIdentifierType is null or can not be resolved, null will be returned.
        Parameters:
        storeIdentifierType - the store identifier type
        Returns:
        the store id
        Throws:
        DataLoadApplicationException - An application exception will be thrown if there was a problem resolving the store id.
      • resolveStoreIDByStoreIdentifier

        public static java.lang.Integer resolveStoreIDByStoreIdentifier(java.lang.String storeIdentifier)
        Resolves the store id (STOREENT_ID column of STOREENT table) according to store identifier (IDENTIFIER column of STOREENT table). If store identifier is null, empty string or can not be resolved, null will be returned.
        Parameters:
        storeIdentifier - the store identifier
        Returns:
        the store id
      • resolveOwnerIDByStoreIdentifierType

        public static java.lang.String resolveOwnerIDByStoreIdentifierType(StoreIdentifierType storeIdentifierType)
                                                                    throws DataLoadApplicationException
        Resolves the owner id (MEMBER_ID column of STOREENT table) according to store identifier noun part (StoreIdentifierType). If StoreIdentifierType is null or can not be resolved, null will be returned.
        Parameters:
        storeIdentifierType - the store identifier type
        Returns:
        the owner id of the store
        Throws:
        DataLoadApplicationException - an application exception will be thrown if the store identifier can not be found.
      • resolveOwnerIDByStoreIdentifier

        public static java.lang.String resolveOwnerIDByStoreIdentifier(java.lang.String storeIdentifier)
                                                                throws DataLoadApplicationException
        Resolves the owner id (MEMBER_ID column of STOREENT table) according to store identifier (IDENTIFIER column of STOREENT table). If store identifier is null, empty string or can not be resolved, null will be returned.
        Parameters:
        storeIdentifier - the store identifier
        Returns:
        the owner id of the store
        Throws:
        DataLoadApplicationException - an application exception will be thrown if the store identifier can not be found.
      • resolveOwnerIDByStoreID

        public static java.lang.String resolveOwnerIDByStoreID(java.lang.String storeId)
        Resolves the owner id (MEMBER_ID column of STOREENT table) according to store id (STOREENT_ID column of STOREENT table). If store id is null, empty string or can not be resolved, null will be returned.
        Parameters:
        storeId - the store id
        Returns:
        the owner id of the store
      • resolveIdentifier

        public java.lang.String[] resolveIdentifier(java.lang.Integer storeID,
                                                    java.lang.String inMemberID,
                                                    java.lang.String pageGroupType,
                                                    java.lang.String identifier)
                                             throws DataLoadException
        Resolve the categoryID or catentryID based on the pagegroup type and identifier
        Parameters:
        storeID - The store ID
        inMemberID - The member ID
        pageGroupType - The pageGroup type
        identifier - The identifier
        Returns:
        CategoryID or Catentry ID
        Throws:
        DataLoadException - An application exception will be thrown if there was a problem resolving the identifier
      • getNameByDmactivityIdAndStoreIdFromDmactivity

        public java.lang.String getNameByDmactivityIdAndStoreIdFromDmactivity(java.lang.String dmActivityID,
                                                                              java.lang.String storeID)
                                                                       throws DataLoadException
        Find the NAME from DMACTIVITY table
        Parameters:
        dmActivityID - The name of page
        storeID - The layout ID
        Returns:
        The unique identifier of a pagelayout location
        Throws:
        DataLoadException - An application exception will be thrown if there was a problem with the SQL call