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

Class ChangeActivityMediator

    • Constructor Detail

      • ChangeActivityMediator

        public ChangeActivityMediator()
    • Method Detail

      • create

        public void create(java.lang.Object aNoun)
                    throws AbstractApplicationException
        This method populates the physical data container with the new Dmactivity object to create. It sets all the activity data, including any provided user data, from the logical activity noun.
        Parameters:
        aNoun - The logical ActivityType SDO business object to create.
        Throws:
        AbstractApplicationException
      • delete

        public void delete(java.lang.Object aNoun)
                    throws AbstractApplicationException
        This method updates the physical data container with the Dmactivity object to delete. If the activity is active, the activity is first deactivated.
        Parameters:
        aNoun - The logical ActivityType SDO business object to delete.
        Throws:
        AbstractApplicationException
      • findPhysicalEntity

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

        public java.util.List validateCreate(java.lang.Object aNoun)
                                      throws DataMediatorException
        This method checks if the logical activity noun can be created. It verifies that the name of the activity does not already exist in the store, it validates the dates and it checks that the end date is after the start date. It checks if the required fields (activity name) 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 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)
                                      throws DataMediatorException
        This method checks if the logical activity noun can be updated. It checks that the activity exists in the physical data container. 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 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)
                                      throws DataMediatorException
        This method checks if the logical activity noun 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 ActivityType 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