com.ibm.commerce.account.commands
Class CreateAccountCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.account.commands.CreateAccountCmdImpl
All Implemented Interfaces:
CreateAccountCmd, ECCommand, ECTargetableCommand, TaskCommand

public class CreateAccountCmdImpl
extends TaskCommandImpl
implements CreateAccountCmd

This is the default implementation of the CreateAccount task command. The following access beans are used in this default implementation: AccountAccessBean, TradingAgreementAccessBean, StoreEntityAccessBean, UserAccessBean, OrganizationAccessBean, MemberGroupAccessBean, TradingDescriptionAccessBean, ParticipantAccessBean, TermConditionDescriptionAccessBean, PaymentTCAccessBean, InvoiceTCAccessBean, POTCBlanketAccessBean, POTCIndvidualAccessBean, POTCLimitedAccessBean and DisplayCustomizationAccessBean.

See Also:
CreateAccountCmd, Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of the default implementation.
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.account.commands. CreateAccountCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
CreateAccountCmdImpl()
          Constructor for CreateAccountCmdImpl.
 
Method Summary
 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()
          This method creates the business account.
 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 com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

CLASSNAME

public static final java.lang.String CLASSNAME
The name of the default implementation.
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 ECException
This method creates the business account.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
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 partcipant is not a Buyer participant. Raised with message _ERR_RETRIEVE_MEMBER_ID if member ID in a Memeber 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:
AbstratECTargetableCommand#performExecute()

setAccountDescriptionElement

public void setAccountDescriptionElement(org.w3c.dom.Element accountDescriptionElement)
Sets the account description element.
Parameters:
accountDescriptionElement - the business accunt 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