com.ibm.commerce.me.commands

Class PunchOutCatalogDisplayCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PunchOutCatalogDisplayCmd, Protectable, 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 PunchOutCatalogDisplayCmdImpl
    extends ControllerCommandImpl
    implements PunchOutCatalogDisplayCmd
    The PunchOutCatalogDisplayCmdImpl class is defined in this file. This command is the shopping flow entry point for the Procurement requisitioner or user. When the requisitioner is authenticated in the PunchOutSetup command, the authentication information is stored in the supplier cookie table. The key to that table entry and the URL of this command name are sent in the response. Now the procurement system will invoke this command for the requisitioner providing the supplier cookie. This command will retrieve and verify the buyer information using the supplier cookie and forward it to the appropriate view task based on the logon mode. (Display, Edit or Inspect)
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright field
        See Also:
        Constant Field Values
    • Constructor Detail

      • PunchOutCatalogDisplayCmdImpl

        public PunchOutCatalogDisplayCmdImpl()
        PunchOutcatalogDisplayCmdImpl constructor.
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        The business logic for this controller command. This method will invoke checkParametersOK() and then retrieve the buyerRequestInfo from the SupplierCookieTable. Since the SupplierCookieTable has been implemented using the Singleton pattern we do not instantiate it. Next, it will put related fields retrieved from the buyerRequestInfo into response properties. Finally, it will create a request session, and add it into the RequisitionerSessionTable.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        CommandException - Raised when unable to retrieve the buyer request information from the supplier cookie table.
        ECException
      • setCatalogId

        public void setCatalogId(java.lang.Long catalogId)
        Sets the catalog ID that represents the primary key of the catalog from which the category view is to be retrieved.
        Specified by:
        setCatalogId in interface PunchOutCatalogDisplayCmd
        Parameters:
        anCatalogId - The catalog ID that represents the primary key of the catalog.
        See Also:
        PuchOutCatalogDisplayCmd#setCatalogId()
      • setIdentifier

        public void setIdentifier(java.lang.String id)
        Sets the external Identifier that along with the MemberId uniquely identifies the category whose view is to be retrieved.
        Specified by:
        setIdentifier in interface PunchOutCatalogDisplayCmd
        Parameters:
        id - The external identifier ID that is used along with the memberId to identify the category.
        See Also:
        PuchOutCatalogDisplayCmd#setIdentifier()
      • setMemberId

        public void setMemberId(java.lang.Long memberId)
        Sets the MemberId (or owner) that along with the Identifier uniquely identifies the category whose view is to be retrieved.
        Specified by:
        setMemberId in interface PunchOutCatalogDisplayCmd
        Parameters:
        anMemberId - The memberId, used along with identifier ID to identify the category.
        See Also:
        PuchOutCatalogDisplayCmd#setMemberId()
      • setRequestProperties

        public void setRequestProperties(TypedProperty p)
                                  throws ECException
        The Web controller calls the setRequestProperties method before invoking the execute method in this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.
        Specified by:
        setRequestProperties in interface ControllerCommand
        Overrides:
        setRequestProperties in class ControllerCommandImpl
        Parameters:
        requestProperties - The com.ibm.commerce.datatype.TypedProperty
        Throws:
        ECException - Raised when the supplier cookie URL is null.
      • setSupplierCookie

        public void setSupplierCookie(java.lang.String supplierCookie)
        This method sets the supplier cookie which contains the buyer and supplier credentials.
        Specified by:
        setSupplierCookie in interface PunchOutCatalogDisplayCmd
        Parameters:
        supplierCookie - The supplier cookie which contains the buyer and supplier credentials.
        See Also:
        PuchOutCatalogDisplayCmd#setSupplierCookie()
      • validateParameters

        public void validateParameters()
                                throws ECException
        Check whether all the required parameters are available for authentication. The supplierCookie is the required parameter. It cannot be null or empty.
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECException - Raised when required supplierCookie is null or empty.