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

Class ChangeMarketingContentAttachmentReferenceMediator

    • Constructor Detail

      • ChangeMarketingContentAttachmentReferenceMediator

        public ChangeMarketingContentAttachmentReferenceMediator()
    • Method Detail

      • create

        public void create(java.lang.Object aMarketingContentNoun,
                           java.lang.Object aAtchRefNounPart)
                    throws AbstractApplicationException
        This method creates the attachment reference physical entities corresponding to the logical noun part and adds to the root marketing content physical entity. It generates a new attachment reference ID and then calls the updateCollateralAttachmentRelation() method to save the information. Then it calls the createAtchRelDesc() method to create the attachment reference description.
        Parameters:
        aMarketingContentNoun - The logical MarketingContentType SDO business object that is the parent of the object to create.
        aAtchRefNounPart - The logical AttachmentReferenceType SDO business object to create.
        Throws:
        AbstractApplicationException
      • update

        public void update(java.lang.Object aMarketingContentNoun,
                           java.lang.Object aAtchRefNounPart)
                    throws AbstractApplicationException
        This method updates the physical data container with the modified Atchrel object. It sets all the attachment reference data from the logical marketing content noun.
        Parameters:
        aMarketingContentNoun - The logical MarketingContentType SDO business object that contains the attachment reference.
        aAtchRefNounPart - The logical AttachmentReferenceType SDO business object to update.
        Throws:
        AbstractApplicationException
      • findPhysicalEntity

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

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

        public java.util.List validateCreate(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the logical attachment reference noun part can be created. It checks if the attachment reference already exists in the marketing content. It checks if the required fields (marketing content identifier, attachment identifier, usage, language identifier) are present. And it checks the fields are valid, and that the attachment exists. 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 that contains the attachment reference.
        aNounPart - The logical AttachmentReferenceType SDO business object to validate.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty.
        Throws:
        DataMediatorException
      • validateChange

        public java.util.List validateChange(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the logical attachment reference noun part can be updated. It checks if the attachment reference already exists in the marketing content. It checks if the required fields (marketing content identifier, attachment identifier, usage, language identifier) are present. And it checks the fields are valid, and that the attachment exists. 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 that contains the attachment reference.
        aNounPart - The logical AttachmentReferenceType SDO business object to validate.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty.
        Throws:
        DataMediatorException
      • validateDelete

        public java.util.List validateDelete(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the logical attachment reference noun part can be deleted. It checks that the activity 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 that contains the attachment reference.
        aNounPart - The logical AttachmentReferenceType SDO business object to validate.
        Returns:
        This method returns a list of ApplicationError if there are any errors, otherwise the list will be empty.
        Throws:
        DataMediatorException