com.ibm.commerce.contract.commands

Class AddContractNLDescriptionCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.TaskCommandImpl
            • com.ibm.commerce.contract.commands.AddContractNLDescriptionCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, AddContractNLDescriptionCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class AddContractNLDescriptionCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements AddContractNLDescriptionCmd
    This is the default implementation of the AddContractNLDescriptionCmd task command.

    Behaviour:

    Adds the contract national language description (WebSphere Commerce Enterprise only). Normally this command will add the national language description to the database. If an error occurred, an ECException will be thrown.

    Task commands called:

    Access beans called:

    • TermConditionAccessBean
    • ContractAccessBean
    • TradingDescriptionAccessBean
    • TermConditionDescriptionAccessBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getContractId()
      Gets the ID of the contract.
      com.ibm.commerce.accesscontrol.AccessVector getResources()
      Gets the access vector accessed by this command.
      void performExecute()
      This method executes the business logic of this command implementation.
      void setContractNLDescriptionElement(org.w3c.dom.Element element)
      Sets the contract national language description element.
      void validateParameters()
      Validates the given contract information in the Element object.
      • Methods inherited from class java.lang.Object

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

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

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of the default implementation.
        See Also:
        Constant Field Values
      • COPYRIGHT

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

      • AddContractNLDescriptionCmdImpl

        public AddContractNLDescriptionCmdImpl()
    • Method Detail

      • getResources

        public com.ibm.commerce.accesscontrol.AccessVector getResources()
                                                                 throws com.ibm.commerce.exception.ECException
        Gets the access vector accessed by this command. The default implementation returns the ContractAccessBean object of the specified contract

        Specified by:
        getResources in interface com.ibm.commerce.command.ECCommand
        Overrides:
        getResources in class com.ibm.commerce.command.AbstractECTargetableCommand
        Returns:
        AccessVector - a vector of ContractAccessBean
        Throws:
        com.ibm.commerce.exception.ECException
        See Also:
        AbstractECTargetableCommand.getResources()
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        This method executes the business logic of this command implementation. It saves the contract description, terms and conditions description(s).
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - Raised with message _ERR_TRADING_DESC_LOCALE if the locale of the contract description is not a supported one. Raised with message _ERR_TC_DESC_LOCALE if the locale in one of the terms and conditions description is not a supported one. Raised with message _ERR_MISSING_SEQUENCE_NUMBER_IN_TC_DESC if the "sequenceNumber" attribute is missing from one of the TermConditionDescription elements. Raised with message _ERR_TERM_CONDITION_NOT_FOUND whenever if the term condition cannot be found. It is based on the contract id and "sequenceNumber" in one of the TermConditionDescription elements. Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if the "sequenceNumber" is not an Integer string.
        See Also:
        AbstractECTargetableCommand.performExecute()
      • setContractNLDescriptionElement

        public void setContractNLDescriptionElement(org.w3c.dom.Element element)
        Sets the contract national language description element.
        Specified by:
        setContractNLDescriptionElement in interface AddContractNLDescriptionCmd
        Parameters:
        element - the ContractNationalLanguageDescription element
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Validates the given contract information in the Element object.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - Raised with message _ERR_WRONG_CONTRACT_OWNER_MEMBER_INFO if the information provided in contract owner element is incorrect so that the contract owner id cannot be retrieved. Raised with message _ERR_CONTRACT_NOT_FOUND if the contract object cannot be found. It is based on the provided contract name, major version, minor version, origin, owner. Raised with message _ERR_VERSION_NUMBER_FORMAT if the either the major version or minor version of the contract is not Integer.
        See Also:
        AbstractECTargetableCommand.validateParameters()