com.ibm.commerce.account.commands

Class SaveAccountCmdImpl

  • All Implemented Interfaces:
    SaveAccountCmd, com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class SaveAccountCmdImpl
    extends CreateUpdateTradingAgreementBaseCmdImpl
    implements SaveAccountCmd
    This is the default implementation of the SaveAccountCmd task command.

    Behaviour:

    Saves the account based on the account Element object.

    Access beans called:

    AccountAccessBean, TradingAgreementAccessBean, UserAccessBean, OrganizationAccessBean, MemberGroupAccessBean, StoreEntityAccessBean, ParticipantAccessBean, DisplayCustomizationTCAccessBean, POTCBlanketAccessBean, POTCIndividualAccessBean, POTCLimitedAccessBean, PaymentTCAccessBean and InvoiceTCAccessBean.
    See Also:
    SaveAccountCmd, CreateUpdateTradingAgreementBaseCmdImpl
    • Constructor Summary

      Constructors 
      Constructor and Description
      SaveAccountCmdImpl()
      Constructor for SaveAccountCmdImpl.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getAccountId()
      Returns the ID of the newly created account.
      void performExecute()
      Executes the business logic of this command implementation.
      void setAccountElement(org.w3c.dom.Element accountElement)
      Sets the account Element object.
      void setAction(boolean bCreateAction)
      Sets the action for the saving process.
      • 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, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
      • 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, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this command.
        See Also:
        Constant Field Values
      • COPYRIGHT

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

      • SaveAccountCmdImpl

        public SaveAccountCmdImpl()
        Constructor for SaveAccountCmdImpl.
    • Method Detail

      • getAccountId

        public java.lang.Long getAccountId()
        Returns the ID of the newly created account.
        Specified by:
        getAccountId in interface SaveAccountCmd
        Returns:
        the ID of the newly created account
      • 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.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - Raised with message _ERR_RETRIEVE_POLICY_TYPE if the policy type cannot be retrieved based on information in policy reference element. Raised with message _ERR_RETRIEVE_ORG_ID if an error occurred when retrieving the organization ID. Raised with message _ERR_RETRIEVE_USER_ID if an error occurred when retrieving the user ID. Raised with message _ERR_RETRIEVE_MEMBER_GROUP_ID if an error occurred when retrieving the member group ID. Raised with message _ERR_RETRIEVE_POLICY_ID if an error occurred when retrieving policy_id. The information specified in the policy reference element is incorrect. Raised with message _ERR_RETRIEVE_POLICY_ID if a business policy ID cannot be resolved based on the PolicyReference element in one of the terms and conditions. Raised with message _ERR_COLUMN_ACCESSBEANNAME_IN_PATTRIBUTE_NOT_POPULATED if an error occurred when retrieving personalization attribute value accessbean. Column accessbeanname in table pattribute is not populated correctly. Raised with message _ERR_RETRIEVE_OPERATOR_ID if an error occurred when retrieving opeartor_id. The value of "operator" in "AttributeValue" element is incorrect. Raised with message _ERR_RETRIEVE_PATTRIBUTE_ID if an error occurred when retrieving pattribute_id. The value of "attributeName" in "AttributeDetail" element is incorrect. Raised with message _ERR_ACCOUNT_CREATE if any other errors occurred. Raised with message _ERR_RETRIEVE_STORE_ID if the store id cannot be retrieved from the information. The information provided in StoreRef element in one of the terms and conditions. Raised with message _ERR_FINDER_EXCEPTION if the FinderException occurred. Raised with message _ERR_REMOTE_EXCEPTION if the RemoteException occurred. Raised with message _ERR_NAMING_EXCEPTION if the NamingException occurred. Raised with message _ERR_CREATE_EXCEPTION if the CreateException occurred. Raised with message _ERR_REMOVE_EXCEPTION if the RemoveException occurred. Raised with message _ERR_SQL_EXCEPTION if the SQLException occurred. Raised with message _ERR_ACCOUNT_SAVE if any other errors occurred.
        See Also:
        AbstractECTargetableCommand.performExecute()
      • setAccountElement

        public void setAccountElement(org.w3c.dom.Element accountElement)
        Sets the account Element object.
        Specified by:
        setAccountElement in interface SaveAccountCmd
        Parameters:
        accountElement - the contract Element object
      • setAction

        public void setAction(boolean bCreateAction)
        Sets the action for the saving process.
        Specified by:
        setAction in interface SaveAccountCmd
        Parameters:
        bCreateAction - the action of this command. true: create a new account, false: update an existed account.