com.ibm.commerce.contract.commands

Class ContractUploadCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.ControllerCommandImpl
            • com.ibm.commerce.command.UploadToStreamCmdImpl
              • com.ibm.commerce.contract.commands.ContractUploadCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.AccCommand, com.ibm.commerce.command.ControllerCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.UploadToStreamCmd, ContractUploadCmd, com.ibm.commerce.security.Protectable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class ContractUploadCmdImpl
    extends com.ibm.commerce.command.UploadToStreamCmdImpl
    implements ContractUploadCmd
    This is the default implementation of the ContractUploadCmd controller command.

    Input parameters:

    Name Description
    ContractXMLFileName The contract XML file name. Optional.
    TargetStoreId The target store Id for calling import command. Mandatory.
    RequestProperties The Request Properties. Possible values include: TargetStoreId. Optional.

    Output parameters:

    Name Description
    ContractXMLFileName The contract XML file name.
    TargetStoreId The target store Id for calling import command.

    Behaviour:

      Uploads a specified contract XML file from client machine to WebSphere Commerce Server (WebSphere Commerce Enterprise only). The state of the contract in the XML file should be in Approved state.

    commands called:

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      String CLASSNAME
      static java.lang.String COPYRIGHT
      String COPYRIGHT
      • Fields inherited from interface com.ibm.commerce.command.UploadToStreamCmd

        defaultCommandClassName
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getContractXMLFileName()
      Gets the contract XML file name submitted by the user.
      java.lang.String getTargetStoreId()
      Gets the TargetStoreId parameter
      void performExecute()
      Executes the business logic of this command implementation.
      void setContractXMLFileName(java.lang.String strContractFileName)
      Sets the strContractFileName parameter
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty reqParms)
      Gets the input parameters from the requestProperties object and sets each parameter to a local variable.
      void setTargetStoreId(java.lang.String strTargetStoreId)
      Sets the TargetStoreId parameter
      void validateParameters()
      Checks the validity of the parameters.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from class com.ibm.commerce.command.UploadToStreamCmdImpl

        getAttachmentOwner, getAttachmentStream, getErrorURL, getFileName, getFileSize, getRootPath, getUrl, setErrorURL, setRefCmd, setRootPath, setUrl
      • Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl

        checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.command.UploadToStreamCmd

        getAttachmentOwner, getAttachmentStream, getFileName, getFileSize, getUrl
      • Methods inherited from interface com.ibm.commerce.command.ControllerCommand

        checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
      • Methods inherited from interface com.ibm.commerce.command.AccCommand

        accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.security.Protectable

        fulfills, getOwner
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        String CLASSNAME
        See Also:
        Constant Field Values
      • COPYRIGHT

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

      • ContractUploadCmdImpl

        public ContractUploadCmdImpl()
    • Method Detail

      • getContractXMLFileName

        public java.lang.String getContractXMLFileName()
        Gets the contract XML file name submitted by the user.
        Returns:
        Returns a String
      • getTargetStoreId

        public java.lang.String getTargetStoreId()
        Gets the TargetStoreId parameter
        Returns:
        Returns a String
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Executes the business logic of this command implementation.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.UploadToStreamCmdImpl
        Throws:
        com.ibm.commerce.exception.ECApplicationException
        com.ibm.commerce.exception.ECException
      • setContractXMLFileName

        public void setContractXMLFileName(java.lang.String strContractFileName)
        Sets the strContractFileName parameter
        Parameters:
        strContractFileName - The contract XML file name.
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty reqParms)
                                  throws com.ibm.commerce.exception.ECApplicationException
        Gets the input parameters from the requestProperties object and sets each parameter to a local variable. Calls super.setRequestProperties.
        Specified by:
        setRequestProperties in interface com.ibm.commerce.command.ControllerCommand
        Overrides:
        setRequestProperties in class com.ibm.commerce.command.UploadToStreamCmdImpl
        Parameters:
        reqParms - The input parameters that are received by the command.
        Throws:
        com.ibm.commerce.exception.ECApplicationException
      • setTargetStoreId

        public void setTargetStoreId(java.lang.String strTargetStoreId)
        Sets the TargetStoreId parameter
        Parameters:
        strTargetStoreId - The target store Id for calling import command
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Checks the validity of the parameters. This is presently empty since super class checks already check the parameters, but it catches exception from super class.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.UploadToStreamCmdImpl
        Throws:
        com.ibm.commerce.exception.ECException