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

Class ChangeMarketingContentDescriptionPartMediator

  • All Implemented Interfaces:
    BusinessObjectMediator, ChangeBusinessObjectPartMediator


    public class ChangeMarketingContentDescriptionPartMediator
    extends AbstractChangeBusinessObjectPartMediatorImpl
    The marketing content description change mediator creates, updates, and deletes marketing content descriptions, and validates that the create, update, or delete action can be performed. For the marketing text, if the data is longer than 4000 characters, then it is persisted in the LONGMKTGTXT column in the COLLDESC database table. Otherwise, the data is persisted in the MARKETINGTEXT column in the COLLDESC database table.
    • Constructor Detail

      • ChangeMarketingContentDescriptionPartMediator

        public ChangeMarketingContentDescriptionPartMediator()
    • Method Detail

      • create

        public void create(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method populates the physical data container with the new Colldesc object to create. It sets all the marketing content description data, including any provided user data.
        Parameters:
        aNoun - The logical MarketingContentType SDO business object that is the parent of the object to create.
        aNounPart - The logical MarketingContentDescriptionType SDO business object to create.
        Throws:
        AbstractApplicationException
      • update

        public void update(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method updates the physical data container with the modified Colldesc object. It sets all the marketing content description data, including any provided user data, from the logical marketing content noun.
        Parameters:
        aNoun - The logical MarketingContentType SDO business object which is the parent of the object to update.
        aNounPart - The logical MarketingContentDescriptionType SDO business object to update.
        Throws:
        AbstractApplicationException
      • delete

        public void delete(java.lang.Object aNoun,
                           java.lang.Object aNounPart)
                    throws AbstractApplicationException
        This method populates the physical data container with the Colldesc object to delete.
        Parameters:
        aNoun - The logical MarketingContentType SDO business object that is the parent of the object to delete.
        aNounPart - The logical MarketingContentDescriptionType SDO business object to delete.
        Throws:
        AbstractApplicationException
      • getNounPartXPaths

        public java.lang.String[] getNounPartXPaths()
        This method gets the xpath for the description noun part that is part of the marketing content noun.
        Returns:
        The xpath for the marketing content description noun part.
      • validateCreate

        public java.util.List validateCreate(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the logical marketing content description noun part can be created. It checks that string fields are the appropriate length. If the noun cannot be created, the appropriate error exception is added to the list of exceptions to be returned to the caller.
        Parameters:
        aNoun - The logical MarketingContentType SDO business object which is the parent of the object to validate.
        aNounPart - The logical MarketingContentDescriptionType SDO business object to validate.
        Returns:
        This method returns a list of ApplicationErrors if there are any errors, otherwise it returns an empty list.
        Throws:
        DataMediatorException
      • validateChange

        public java.util.List validateChange(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method validates changes to the logical marketing content description noun part. It checks the following things:
        • Verifies that the description exists in the physical data container.
        • Checks that the string fields are the appropriate length.
        If the noun cannot be updated, the appropriate error exception is added to the list of exceptions to be returned to the caller.
        Parameters:
        aNoun - The logical MarketingContentType SDO business object which is the parent of the object to validate.
        aNounPart - The logical MarketingContentDescriptionType SDO business object to validate.
        Returns:
        This method returns a list of ApplicationErrors if there are any errors, otherwise it returns an empty list.
        Throws:
        DataMediatorException
      • validateDelete

        public java.util.List validateDelete(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method determines whether the logical marketing content description noun part can be deleted. It checks that the description exists in the physical data container. If the noun cannot be deleted, the appropriate error exception is added to the list of exceptions to be returned to the caller.
        Parameters:
        aNoun - The logical MarketingContentType SDO business object which is the parent of the object to validate.
        aNounPart - The logical MarketingContentDescriptionType SDO business object to validate.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise it returns an empty list.
        Throws:
        DataMediatorException
      • findPhysicalEntity

        public java.lang.Object findPhysicalEntity(java.lang.Object aNoun,
                                                   java.lang.Object aNounPart)
                                            throws DataMediatorException
        This method returns the Colldesc physical SDO from the PhysicalDataContainer that was created in the initializePhysicalDataContainer method.
        Parameters:
        aNoun - The logical MarketingContentType SDO.
        aNounPart - The logical MarketingContentDescriptionType SDO.
        Returns:
        This method returns the Colldesc object if it is found, otherwise it returns null.
        Throws:
        DataMediatorException