com.ibm.commerce.promotion.facade.server.services.dataaccess.bom.mediator

Class ChangePromotionBasePartMediator

    • Constructor Detail

      • ChangePromotionBasePartMediator

        public ChangePromotionBasePartMediator()
    • Method Detail

      • getNounPartXPaths

        public java.lang.String[] getNounPartXPaths()
        This method gets the xpath for the noun part.
        Returns:
        The xpath for the noun part.
      • create

        public void create(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method performs no actions as creating noun is done by the ChangePromotionMediator.
        Parameters:
        aNoun - The logical PromotionType SDO business object.
        aNounPart - The logical PromotionType SDO business object.
        Throws:
        AbstractApplicationException - when failed to create the noun part.
      • update

        public void update(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method updates the physical data container with the modified Promotion object.
        Parameters:
        aNoun - The logical PromotionType SDO business object to update.
        aNounPart - The logical PromotionType SDO business object to update.
        Throws:
        AbstractApplicationException - When error happens.
      • delete

        public void delete(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method performs no actions as the deleting noun is done by the ChangePromotionMediator.
        Parameters:
        aNoun - The logical PromotionType SDO business object.
        aNounPart - The logical PromotionType SDO business object.
        Throws:
        AbstractApplicationException - when failed to create the noun part.
      • validateCreate

        public java.util.List validateCreate(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method performs no checking as the validation is done by the ChangePromotionMediator.
        Parameters:
        aNoun - The logical PromotionType SDO business object.
        aNounPart - The logical PromotionType SDO business object.
        Returns:
        This method returns null.
        Throws:
        DataMediatorException
      • validateChange

        public java.util.List validateChange(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws AbstractApplicationException
        This method checks if the logical PromotionType noun part can be updated. It checks that the noun exists in the physical data container. If the noun part cannot be updated, the appropriate error exception is added to the list of exceptions to be returned to the caller.
        Parameters:
        aNoun - The logical PromotionType SDO business object to validate.
        aNounPart - The noun part PromotionType SDO business object.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty.
        Throws:
        AbstractApplicationException - When error happens.
      • validateDelete

        public java.util.List validateDelete(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method performs no checking as the validation is done by the ChangePromotionMediator.
        Parameters:
        aNoun - The logical PromotionType SDO business object.
        aNounPart - The logical PromotionType SDO business object.
        Returns:
        This method returns null.
        Throws:
        DataMediatorException
      • findPhysicalEntityWithSameAdminName

        public java.lang.Object findPhysicalEntityWithSameAdminName(java.lang.Object aNoun)
                                                             throws DataMediatorException
        This method is used to find a promotion physical entity in the physical data container which has the same administrative name as the passed logical promotion noun.
        Parameters:
        aNoun - The logical SDO.
        Returns:
        This method returns the Promotion object if it is found; otherwise it returns null.
        Throws:
        DataMediatorException - when an error is encountered.
      • findPhysicalEntity

        public java.lang.Object findPhysicalEntity(java.lang.Object aNoun,
                                                   java.lang.Object aNounPart)
                                            throws DataMediatorException
        This method returns the Promotion physical SDO from the PhysicalDataContainer that was created in the ChangePromotionMediator mediator.
        Parameters:
        aNoun - The logical PromotionType SDO.
        aNounPart - The logical PromotionType SDO.
        Returns:
        This method returns the Promotion object if it is found, otherwise it returns null.
        Throws:
        DataMediatorException - When error happens.