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

Class ChangePromotionElementPartMediator

    • Constructor Detail

      • ChangePromotionElementPartMediator

        public ChangePromotionElementPartMediator()
    • 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 creates the PromotionElement noun part.
        Parameters:
        aNoun - The logical PromotionType SDO business object.
        aNounPart - The noun part PromotionElementType 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 PromotionElement object.
        Parameters:
        aNoun - The logical PromotionType SDO business object to update.
        aNounPart - The noun part PromotionElementType SDO business object to update.
        Throws:
        AbstractApplicationException - When failed to update the noun part.
      • delete

        public void delete(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method deletes the PromotionElement noun part of a Promotion.
        Parameters:
        aNoun - The logical PromotionType SDO business object.
        aNounPart - The noun part PromotionElementType SDO business object.
        Throws:
        AbstractApplicationException - when failed to delete the noun part.
      • validateCreate

        public java.util.List validateCreate(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the logical PromotionElementType noun part can be created. It checks that the noun exists in the physical data container. If the noun part cannot be created, 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 PromotionElementType SDO business object.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty.
        Throws:
        DataMediatorException - When error happens.
      • validateChange

        public java.util.List validateChange(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the logical PromotionElementType 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 PromotionElementType SDO business object.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty.
        Throws:
        DataMediatorException - When error happens.
      • validateDelete

        public java.util.List validateDelete(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the logical PromotionElementType noun part can be deleted. It checks that the noun exists in the physical data container. If the noun part cannot be deleted, 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 PromotionElementType SDO business object.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty.
        Throws:
        DataMediatorException - When error happens.
      • findPhysicalEntity

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