com.ibm.commerce.catalog.facade.server.commands

Class ProcessCatalogEntryCreateActionCmdImpl

  • All Implemented Interfaces:
    ProcessCatalogEntryActionCmd, AbstractProcessNounActionCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class ProcessCatalogEntryCreateActionCmdImpl
    extends AbstractProcessCreateActionUsingBusinessObjectMediatorCmdImpl
    implements ProcessCatalogEntryActionCmd
    • This is the command used for creating a catalog entry.
    • This command will create a catalog entry based on the following CatalogEntry noun
    • top level elements passed in from the request:
    • CatalogEntryIdentifier, _cat:Description ,_cat:CatalogEntryAttributes, ListPrice, _cat:Price,
    • ParentCatalogGroupIdentifier, ParentCatalogEntryIdentifier,
    • _cat:NavigationalRelationship, _cat:Association,_cat:KitComponent.
    • This command is valid only for a master catalog.
    • The catalog entry identifier and the catalog entry type are the minimal information
    • required for the creation.
    • If the parent catentry is specified, the catalog entry to be created should be a sku
    • and the parent should be a existing product in the store.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class com.ibm.websphere.command.TargetableCommandImpl

        LOCAL
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void performExecute()
      This methods calls the catalog entry mediator to create the catalog entry.
      void read() 
      void save()
      Saves the changes associated with the catalog entry creattion.
      void validate()
      Data validations for this command The following validations are done. 1.Validate if the store in context is not a Channel Hub Store. 2.Validate if the catalog in context is the master catalog. 3.Validate that the catalog entry identifier and catalog entry type are provided for creating and that the catalog entry type is valid. 4.
      • Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl

        execute, executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
      • Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl

        getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.websphere.command.Command

        execute, isReadyToCallExecute, reset
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

        getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
    • Constructor Detail

      • ProcessCatalogEntryCreateActionCmdImpl

        public ProcessCatalogEntryCreateActionCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws java.lang.Exception
        • This methods calls the catalog entry mediator to create the catalog entry
        • .
        • The mediator inturn would use the noun part mediators.
        • The noun part mediaters would create the necessary relationship
        • Based on the parameters passed
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractProcessCreateActionUsingBusinessObjectMediatorCmdImpl
        Throws:
        java.lang.Exception
      • validate

        public void validate()
                      throws CatalogApplicationException
        • Data validations for this command
        • The following validations are done.
        • 1.Validate if the store in context is not a Channel Hub Store.
        • 2.Validate if the catalog in context is the master catalog.
        • 3.Validate that the catalog entry identifier and catalog entry type
        • are provided for creating and that the catalog entry type is valid.
        • 4. Validate that the owner id if passed is the store owner id.
        • 5. If the parent catentry is specified validate that the parent is an existing
        • product in the store and the child to be created is a sku type.
        • 6. If all validations pass, check if the parent catgroup if specifed exists.
        • If it exists and the parent catentry is also specified, verify that the parent category of
        • the parent catentry and the parent category specified in the request are the same. If not report an error.
        Specified by:
        validate in interface AbstractProcessNounActionCmd
        Overrides:
        validate in class AbstractProcessCreateActionUsingBusinessObjectMediatorCmdImpl
        Throws:
        CatalogApplicationException
        See Also:
        AbstractProcessNounActionCmd.validate()