Class CreateContractBasicInfoCmdImpl

    • Field Detail


        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • contractName

        public java.lang.String contractName
        Contract name.
      • tradingId

        public java.lang.Long tradingId
        Trading ID.
      • contractOwner

        public java.lang.Long contractOwner
        Contract owner.
      • accountId

        public java.lang.Long accountId
        Account ID.
    • Constructor Detail

      • CreateContractBasicInfoCmdImpl

        public CreateContractBasicInfoCmdImpl()
        Default constructor.
    • Method Detail

      • reset

        public void reset()
        Reset the command.
        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand
      • getAccountId

        public java.lang.Long getAccountId()
        Retrieves the account Id.
        The account Id.
      • getContractName

        public java.lang.String getContractName()
        Retrieves the name of the contract.
        The name of the contract.
      • getContractOwner

        public java.lang.Long getContractOwner()
        Retrieves the ID of the contract owner.
        The ID of the contract owner.
      • getTradingId

        public java.lang.Long getTradingId()
        Retrieves the trading agreement ID.
        The ID of the trading agreement.
      • setAccountId

        public void setAccountId(java.lang.Long newAccountId)
        Stores the account ID.
        Specified by:
        setAccountId in interface CreateContractBasicInfoCmd
        newAccountId - The account Id.
      • setContractName

        public void setContractName(java.lang.String newContractName)
        Stores the incoming value for the contract name.
        Specified by:
        setContractName in interface CreateContractBasicInfoCmd
        newContractName - The name of the contract.
      • setContractOwner

        public void setContractOwner(java.lang.Long newContractOwner)
        Stores the incoming value for the contract owner ID.
        Specified by:
        setContractOwner in interface CreateContractBasicInfoCmd
        newContractOwner - The ID of the contract owner.
      • setTradingId

        public void setTradingId(java.lang.Long newTradingId)
        Stores the incoming value for the Trading Agreement ID.
        Specified by:
        setTradingId in interface CreateContractBasicInfoCmd
        newTradingId - The ID of the trading agreement.
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method does the following:
        1. Checks if a name has been provided for the contract.
        2. Checks if a trading agreement ID has been provided.
        3. Checks if incoming trading agreement ID is valid.
        4. Checks if the supplied name is already being used by another contract in the system.

        Specified by:
        validateParameters in interface ECCommand
        validateParameters in class AbstractECTargetableCommand
        ECApplicationException -
        • If the contract name has not been provided.
        • If the trading agreement ID has not been provided.
        • If the trading agreement is invalid.
        • If another contract with the supplied name exists.
        ECSystemException -
        • If any error occurs while accessing the trading agreement object.
        • If any error occurs while determining if another contract with the same name exists.
        See Also: