com.ibm.commerce.tools.catalog.commands

Class CategoryUpdateImpl

    • Constructor Detail

      • CategoryUpdateImpl

        public CategoryUpdateImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method implements the business logic for the CategoryUpdate controller command. The different values retrieved in the setRequestProperties are updated in the database.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException
      • reset

        public void reset()
        This method resets all instance variables to null.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setRequestProperties

        public void setRequestProperties(TypedProperty reqParams)
                                  throws ECApplicationException
        This method accepts input parameters from RequestProperties for the controller command. A vector for parameter ECToolsConstants.EC_XMLOBJECT is retrieved from the request properties. The first element of the vector is the hashtable representation of the XML object created by the category notebook. A sample of the hashtable (string representation) used by this command is as follows:
         
         
        {
                XML=
                {
                        XMLFile=catalog.categoryNotebook,
                        bCreate=false,
                        categoryparent=
                        {
                                parent_path=10101:owner=7000000000000000101,
                                catalog_id=10101,
                                parent_category_name=,
                                category_id=58851,
                                old_parent_category_id=,
                                parent_category_id=,
                                path=10101:owner=7000000000000000101/58851:owner=7000000000000000101
                        },
                        categorygeneral=
                        {
                                contracts=false,
                                ps_id=,
                                name=cat10001namerequired,
                                code=cat1001required,
                                longdescription=longdescriptionsample,
                                keyword=keywordsample,
                                published=1,
                                description=descriptionsample,
                                catalog_id=10101
                        },
                        categoryId=58851,
                        image=
                        {
                                fullimage=/dir/sample/img2.gif,
                                thumbnail=/dir/sample/img1.gif
                        },
                        path=10101:owner=7000000000000000101/58851:owner=7000000000000000101
                }
        }
         
         
        Specified by:
        setRequestProperties in interface ControllerCommand
        Overrides:
        setRequestProperties in class ToolsControllerCommandImpl
        Parameters:
        reqParams - com.ibm.commerce.datatype.TypedProperty
        Throws:
        ECApplicationException.
        ECApplicationException - if the request properties can't be processed