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

Class ChangeCampaignElementPartMediator

    • Constructor Detail

      • ChangeCampaignElementPartMediator

        public ChangeCampaignElementPartMediator()
    • 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 Dmelement object to create. It sets all the campaign element data, including any provided user data. For the campaign element properties defined in the administration configuration file wc-admin-component.xml, it saves date/times in the time zone specified in the business context.
        Parameters:
        aNoun - The logical ActivityType SDO business object that is the parent of the object to create.
        aNounPart - The logical CampaignElementType 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 Dmelement object. It sets all the campaign element data, including any provided user data, from the logical campaign element noun. It also updates the current version number on the activity. For the campaign element properties defined in the administration configuration file wc-admin-component.xml, it saves date/times in the time zone specified in the business context.
        Parameters:
        aNoun - The logical ActivityType SDO business object which is the parent of the object to update.
        aNounPart - The logical CampaignElementType 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 Dmelement object to delete.
        Parameters:
        aNoun - The logical ActivityType SDO business object that is the parent of the object to delete.
        aNounPart - The logical CampaignElementType SDO business object to delete.
        Throws:
        AbstractApplicationException
      • getNounPartXPaths

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

        public java.util.List validateCreate(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the logical campaign element noun part can be created. It verifies that the name of the campaign element does not already exist in the activity. It checks if the required fields (element name, name-value pair name, name-value pair value) are present, and 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 ActivityType SDO business object which is the parent of the object to validate.
        aNounPart - The logical CampaignElementType 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 campaign element noun part can be updated. It checks that the campaign element exists in the physical data container. If updating the element name, it verifies that the name of the campaign element does not already exist in the activity. It checks if the required fields (element name, name-value pair name, name-value pair value) are present, and that 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 ActivityType SDO business object which is the parent of the object to validate.
        aNounPart - The logical CampaignElementType 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 campaign element noun part can be deleted. It checks that the campaign element 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 ActivityType SDO business object which is the parent of the object to validate.
        aNounPart - The logical CampaignElementType 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
      • findPhysicalEntity

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

        public boolean isActivityActive(java.lang.Object aNoun)
                                 throws DataMediatorException
        This method checks if an activity is currently active.
        Parameters:
        aNoun - The logical ActivityType SDO.
        Returns:
        This method returns true if the Dmactivity object is currently active, otherwise it returns false.
        Throws:
        DataMediatorException