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

Class ChangeCatalogAttachmentReferenceMediator

    • Constructor Detail

      • ChangeCatalogAttachmentReferenceMediator

        public ChangeCatalogAttachmentReferenceMediator()
    • Method Detail

      • create

        public void create(java.lang.Object aCatalogNoun,
                           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 catalog physical entity. It generates a new attachment reference id and then calls the method updateCatalogAttachmentRelation() to save the info. Then it calls the method createAtchRelDesc() to create the attachment reference description.
        Parameters:
        aCatalogNoun - (CatalogType) The catalog logical noun that contains the noun part
        aAtchRefNounPart - (AttachmentReferenceType) The attachment reference logical noun part for which the corresponding physical entities need to be created
        Throws:
        AbstractApplicationException
      • update

        public void update(java.lang.Object aCatalogNoun,
                           java.lang.Object aAtchRefNounPart)
                    throws AbstractApplicationException
        This method updates the physical entity of attachment reference corresponding to the logical noun part
        Parameters:
        aCatalogNoun - (CatalogType) The logical noun that contains the noun part
        aAtchRefNounPart - (AttachmentReferenceType) The noun part for which the corresponding physical entities need to be updated
        Throws:
        AbstractApplicationException
      • findPhysicalEntity

        public java.lang.Object findPhysicalEntity(java.lang.Object aNoun,
                                                   java.lang.Object aNounPart)
                                            throws DataMediatorException
        This method finds the catalog attachment relation physical entity in the data graph corresponding to the logical object.
        Parameters:
        aNoun - (CatalogType) The logical noun
        aNounPart - (AttachmentReferenceType) The logical noun part.
        Returns:
        the physical entity of AttachmentRelation.
        Throws:
        DataMediatorException
      • getNounPartXPaths

        public java.lang.String[] getNounPartXPaths()
        This method gets the XPath for this noun part mediator. For attachment reference mediator the path will be "/AttachmentReference[]"
        Returns:
        the String[] of XPath.
      • validateCreate

        public java.util.List validateCreate(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the object to be created is present in the physical data container. If the entity is already present then a validation error will be added to the return list
        Parameters:
        aNoun - the noun object
        aNounPart - the noun part object
        Returns:
        the list of errors.
        Throws:
        DataMediatorException
      • validateChange

        public java.util.List validateChange(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the object to be changed is present in the physical data container. If the entity is not present then a validation error will be added to the return list.
        Parameters:
        aNoun - the noun object
        aNounPart - the noun part object
        Returns:
        the list of errors.
        Throws:
        DataMediatorException
      • validateDelete

        public java.util.List validateDelete(java.lang.Object aNoun,
                                             java.lang.Object aNounPart)
                                      throws DataMediatorException
        This method checks if the object to be removed is present in the physical data container. If the entity is not present then a validation error will be added to the return list
        Parameters:
        aNoun - the noun object
        aNounPart - the noun part object
        Returns:
        the list of errors.
        Throws:
        DataMediatorException