com.ibm.commerce.account.commands

Class CreateAccountCmdImpl

  • 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.account.commands.CreateAccountCmdImpl
  • All Implemented Interfaces:
    CreateAccountCmd, 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 CreateAccountCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements CreateAccountCmd
    This is the default implementation of the CreateAccountCmd task command.

    Behaviour:

    Create a new account based on the given account element object.

    Access beans called:

    AccountAccessBean, TradingAgreementAccessBean, StoreEntityAccessBean, UserAccessBean, OrganizationAccessBean, MemberGroupAccessBean, TradingDescriptionAccessBean, ParticipantAccessBean, TermConditionDescriptionAccessBean, PaymentTCAccessBean, InvoiceTCAccessBean, POTCBlanketAccessBean, POTCIndvidualAccessBean, POTCLimitedAccessBean and DisplayCustomizationAccessBean.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      The name of the default implementation.
      static java.lang.String COPYRIGHT
      The IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CreateAccountCmdImpl()
      Constructor for CreateAccountCmdImpl.
    • 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 business account.
      java.lang.Integer getAccountState()
      Gets the state of the newly created business account.
      void parseXMLDocument()
      Parses the account XML Element objects.
      void performExecute()
      Executes the business logic of this command implementation.
      void setAccountDescriptionElement(org.w3c.dom.Element accountDescriptionElement)
      Sets the account description element.
      void setAccountElement(org.w3c.dom.Element accountElement)
      Sets the account XML element.
      void setAccountId(java.lang.Long accountId)
      Sets the business account ID.
      void setAccountState(java.lang.String accountState)
      Sets the state of the business account.
      void setLanguageId(java.lang.Integer langId)
      Sets the language ID.
      • 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 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

      • CreateAccountCmdImpl

        public CreateAccountCmdImpl()
        Constructor for CreateAccountCmdImpl.
    • Method Detail

      • getAccountId

        public java.lang.Long getAccountId()
        Returns the ID of the newly created business account.
        Specified by:
        getAccountId in interface CreateAccountCmd
        Returns:
        the business account ID
      • getAccountState

        public java.lang.Integer getAccountState()
        Gets the state of the newly created business account.
        Returns:
        the state of the business account
      • parseXMLDocument

        public void parseXMLDocument()
        Parses the account XML Element objects.
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Executes the business logic of this command implementation. This method creates the business account.
        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_ACCOUNT_RESOLVE_OWNER_ID if the account owner Id cannot be resolved. Raised with message _ERR_ACCOUNT_PARTICIPANT_INVALID_ROLE if the role type of a business account participant is not one of the following roles: AccountHolder, BuyerContact, SellerContact, Buyer, Seller. Raised with message _ERR_ACCOUNT_PARTICIPANT_INVALID_MEMBER_TYPE if one of the following cases occurred: 1. the participant member type is not an organization for an AccountHolder or Seller participant. 2. the participant member type is not an organization or user for a SellerContact participant. 3. the participant member type is not a user for a BuyerContact participant. Raised with message _ERR_ACCOUNT_PARTICIPANT_INVALID_MULTIPLICITY if one of the following cases occurred: 1. more than one AccountHolder participant in the business account 2. more than one Seller participant in the business account 3. more than one Buyer participant in the business account Raised with message _ERR_ACCOUNT_RESOLVE_PARTICIPANT_MEMBER_ID if an account participant ID cannot be resolved. Raised with message _ERR_TERM_CONDITION_PARTICIPANT_ROLE if a term and condition participant is not a Buyer participant. Raised with message _ERR_RETRIEVE_MEMBER_ID if member ID in a Member element for PolicyReference element cannot be resolved. 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.
        See Also:
        AbstractECTargetableCommand#performExecute()
      • setAccountDescriptionElement

        public void setAccountDescriptionElement(org.w3c.dom.Element accountDescriptionElement)
        Sets the account description element.
        Parameters:
        accountDescriptionElement - the business account description element object
      • setAccountElement

        public void setAccountElement(org.w3c.dom.Element accountElement)
        Sets the account XML element.
        Specified by:
        setAccountElement in interface CreateAccountCmd
        Parameters:
        accountElement - the business account Element object
      • setAccountId

        public void setAccountId(java.lang.Long accountId)
        Sets the business account ID.
        Parameters:
        accountId - the business account ID.
      • setAccountState

        public void setAccountState(java.lang.String accountState)
        Sets the state of the business account.
        Parameters:
        accountState - the state of the business account
      • setLanguageId

        public void setLanguageId(java.lang.Integer langId)
        Sets the language ID.
        Specified by:
        setLanguageId in interface CreateAccountCmd
        Parameters:
        langId - the language ID