com.ibm.commerce.tools.optools.user.commands
Class CSRCustomerInfoCreateCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl
                          |
                          +--com.ibm.commerce.tools.optools.user.commands.CSRCustomerInfoCreateCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, CSRCustomerInfoUpdateCmd, ECCommand, ECTargetableCommand, ToolsControllerCommand

public class CSRCustomerInfoCreateCmdImpl
extends ToolsControllerCommandImpl
implements CSRCustomerInfoUpdateCmd

Creates customer registration information by calling UserRegistrationAdminAddCmd.

URL calling syntax:

Parameters:
XML
An input xml_string that contains the all required data for creating the registration information for the customer.
Example xml_string:
       <?xml version="1.0" encoding "UTF-8">
       <userUpdated>false</userUpdated>
       <userProfileUpdated>true</userProfileUpdated>
       <addressUpdated>true</addressUpdated>
       <demographicsUpdated>false</demographicsUpdated>
       <userRegUpdated>false</userRegUpdated>
       <certStatusUpdated>false</certStatusUpdated>
       <customerId>20000</customerId>
       <profileInfo>
           <addressId>7777</addressId>
           <lastName>Smith</lastName>
           <firstName>John</firstName>
           <middleName>M.</middleName>
           <title>1</title>
       </profileInfo>
       <addressInfo>
       <address1>8200 Warden Ave.</address1>
       <address2>Building A2</address2>
       <address3>Unit 999</address3>
       <city>Markham</city>
       <state>Ontario</state>
       <country>Canada</country>
           <zip>L3N 3R6</zip>
       </addressInfo>
       </xml>

Exceptions:

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          copyright notice
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.tools.optools.user.commands. CSRCustomerInfoUpdateCmd
defaultCommandClassName
 
Fields inherited from interface com.ibm.commerce.tools.command. ToolsControllerCommand
NAME
 
Constructor Summary
CSRCustomerInfoCreateCmdImpl()
          Default constructor.
 
Method Summary
protected  void exceptionUtil( TypedProperty prop, java.lang.Exception ex, java.lang.String methodName, java.lang.String cmdName, java.lang.String errMsg)
          Generates common exception code.
  TypedProperty executeUserRegistrationAdminAdd()
          Calls UserRegistrationAdminAddCmd to create all the users information.
 java.lang.String getAddress1()
          Returns the first line of the customer's address.
 java.lang.String getAddress2()
          Returns the second line of the customer's address.
 java.lang.String getAddress3()
          Returns the third line of the customer's address.
 java.lang.String getAddressId()
          Returns the address id of the customer's address.
 java.lang.String getAge()
          Returns the age of the customer.
 java.lang.String getAnnualIncome()
          Returns the annual income of the customer.
 java.lang.String getBestTimeToCall()
          Returns the best time to call the customer.
 java.lang.String getChallengeAnswer()
          Returns the answer to the customer's challenge question.
 java.lang.String getChallengeQuestion()
          Returns the customer's challenge question.
 java.lang.String getChildrenNum()
          Returns the number of children of the customer.
 java.lang.String getCity()
          Returns the customer's city.
 java.lang.String getCountry()
          Returns the customer's country or region.
 java.lang.String getCustomerId()
          Returns the customer's id.
 java.lang.String getEmail1()
          Returns the customer's e-mail address 1.
 java.lang.String getEmail2()
          Returns the customer's e-mail address 2.
 java.lang.String getEmployer()
          Returns the name of the customer's employer.
 java.lang.String getFax1()
          Returns the customer's fax number 1.
 java.lang.String getFax2()
          Returns the customer's fax number 2.
 java.lang.String getFirstName()
          Returns the customer's first name.
 java.lang.String getGender()
          Returns the customer's gender.
 java.lang.String getHobby()
          Returns the customer's hobby.
 java.lang.String getLastName()
          Returns the customer's last name.
 java.lang.String getLogonId()
          Returns the customer's logon id.
 java.lang.String getLogonPassword()
          Returns user logon password.
 java.lang.String getLogonPasswordConfirmation()
          Returns user logon password confirmation.
 java.lang.String getMaritalStatus()
          Returns the customer's marital status.
 java.lang.String getMiddleName()
          Returns the customer's middle name.
 java.util.Hashtable getNLS()
          Returns the properties containing all translatable messages for this command.
 java.lang.String getOrderedBefore()
          Returns whether or not the customer has ordered before.
 java.lang.String getPackageInsert()
          Returns whether or not to include promotional material with shipments
 java.lang.String getPeopleNumInHouse()
          Returns the number of household members.
 java.lang.String getPhone1()
          Returns the customer's primary phone number.
 java.lang.String getPhone1Listed()
          Returns whether customer's primary phone number is listed.
 java.lang.String getPhone1Type()
          Returns what type of phone is customer's primary phone number.
 java.lang.String getPhone2()
          Returns the customer's alternative phone number.
 java.lang.String getPhone2Listed()
          Returns whether customer's alternative phone number is listed.
 java.lang.String getPhone2Type()
          Returns what type of phone is customer's alternative phone number.
 java.lang.String getPreferredCommunication()
          Returns the customer's preferred method of communication.
 java.lang.String getPreferredCurrency()
          Returns the customer's preferred currency.
 java.lang.String getPreferredLanguage()
          Returns the customer's preferred language.
 java.lang.String getPreviouslyOrdered()
          Returns whether or not the customer has ordered before.
 java.lang.String getState()
          Returns the customer's state or province
protected  java.lang.String getSuccessMsg(java.util.Hashtable nlsProperty, java.lang.String userId)
          Returns final success message.
 java.lang.String getTitle()
          Returns the customer's title.
 java.lang.String getUserAccountStatus()
          Returns whether the customer's account status (enabled or disabled).
 java.lang.String getXMLFile()
          Returns the XML file.
 java.lang.String getZip()
          Return the customer's zip/postal code.
 void performExecute()
          Performs the execution for creating a customer's information.
 void setNLS(java.util.Hashtable newNLS)
          Sets the NLS hashtable.
 void validateParameters()
          Gets XMLObject from the GUI Notebook and gets ready to parse it.
 
Methods inherited from class com.ibm.commerce.tools.command. ToolsControllerCommandImpl
getViewInputProperties, setRequestProperties
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

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

CSRCustomerInfoCreateCmdImpl

public CSRCustomerInfoCreateCmdImpl()
Default constructor.
Method Detail

exceptionUtil

protected void exceptionUtil(TypedProperty prop,
                             java.lang.Exception ex,
                             java.lang.String methodName,
                             java.lang.String cmdName,
                             java.lang.String errMsg)
                      throws ECApplicationException
Generates common exception code.
Parameters:
prop - The response typed property.
ex - The catched exception.
methodName - The method that generates the exception.
cmdName - The command that generates the exception.
errMsg - The error message.
Throws:
ECApplicationException - If there were problems composing the exception.

executeUserRegistrationAdminAdd

public TypedProperty executeUserRegistrationAdminAdd()
                                              throws java.lang.Exception
Calls UserRegistrationAdminAddCmd to create all the users information.
Returns:
The response typed property.
Throws:
ECApplicationException - If the UserRegistrationAdminAddCmd command cannot be found.
java.lang.Exception

getAddress1

public java.lang.String getAddress1()
Returns the first line of the customer's address.
Returns:
The frst line of the address.

getAddress2

public java.lang.String getAddress2()
Returns the second line of the customer's address.
Returns:
The second line of the address.

getAddress3

public java.lang.String getAddress3()
Returns the third line of the customer's address.
Returns:
The third line of the address.

getAddressId

public java.lang.String getAddressId()
Returns the address id of the customer's address.
Returns:
The address Id.

getAge

public java.lang.String getAge()
Returns the age of the customer.
Returns:
The age of the customer.

getAnnualIncome

public java.lang.String getAnnualIncome()
Returns the annual income of the customer.
Returns:
The annual income.

getBestTimeToCall

public java.lang.String getBestTimeToCall()
Returns the best time to call the customer.
Returns:
The best calling time.

getChallengeAnswer

public java.lang.String getChallengeAnswer()
Returns the answer to the customer's challenge question.
Returns:
The answer of the challenge question.

getChallengeQuestion

public java.lang.String getChallengeQuestion()
Returns the customer's challenge question.
Returns:
The challenge question.

getChildrenNum

public java.lang.String getChildrenNum()
Returns the number of children of the customer.
Returns:
The number of children.

getCity

public java.lang.String getCity()
Returns the customer's city.
Returns:
The city.

getCountry

public java.lang.String getCountry()
Returns the customer's country or region.
Returns:
The country.

getCustomerId

public java.lang.String getCustomerId()
Returns the customer's id.
Returns:
The customer ID.

getEmail1

public java.lang.String getEmail1()
Returns the customer's e-mail address 1.
Returns:
The customer's primary email address.

getEmail2

public java.lang.String getEmail2()
Returns the customer's e-mail address 2.
Returns:
The customer alternative email address.

getEmployer

public java.lang.String getEmployer()
Returns the name of the customer's employer.
Returns:
The company name.

getFax1

public java.lang.String getFax1()
Returns the customer's fax number 1.
Returns:
The customer's primary fax number.

getFax2

public java.lang.String getFax2()
Returns the customer's fax number 2.
Returns:
The customer's alternative fax number.

getFirstName

public java.lang.String getFirstName()
Returns the customer's first name.
Returns:
The first name.

getGender

public java.lang.String getGender()
Returns the customer's gender.
Returns:
The gender.

getHobby

public java.lang.String getHobby()
Returns the customer's hobby.
Returns:
The hobby.

getLastName

public java.lang.String getLastName()
Returns the customer's last name.
Returns:
The last name.

getLogonId

public java.lang.String getLogonId()
Returns the customer's logon id.
Returns:
The customer logon ID.

getMaritalStatus

public java.lang.String getMaritalStatus()
Returns the customer's marital status.
Returns:
The marital status.

getMiddleName

public java.lang.String getMiddleName()
Returns the customer's middle name.
Returns:
The middle name.

getNLS

public java.util.Hashtable getNLS()
Returns the properties containing all translatable messages for this command.
Returns:
The NLS properties.

getOrderedBefore

public java.lang.String getOrderedBefore()
Returns whether or not the customer has ordered before.
Returns:
If it is a returned customer.

getPackageInsert

public java.lang.String getPackageInsert()
Returns whether or not to include promotional material with shipments
Returns:
If promotional material shipments needed.

getLogonPassword

public java.lang.String getLogonPassword()
Returns user logon password.
Returns:
The user's logon password.

getLogonPasswordConfirmation

public java.lang.String getLogonPasswordConfirmation()
Returns user logon password confirmation.
Returns:
The user's logon password confirmation.

getPeopleNumInHouse

public java.lang.String getPeopleNumInHouse()
Returns the number of household members.
Returns:
The number of household.

getPhone1

public java.lang.String getPhone1()
Returns the customer's primary phone number.
Returns:
The customer's primary phone number.

getPhone1Listed

public java.lang.String getPhone1Listed()
Returns whether customer's primary phone number is listed.
Returns:
If customer's primary phone number is listed.

getPhone1Type

public java.lang.String getPhone1Type()
Returns what type of phone is customer's primary phone number.
Returns:
The phone type of customer's primary phone.

getPhone2

public java.lang.String getPhone2()
Returns the customer's alternative phone number.
Returns:
The customer's alternative phone number.

getPhone2Listed

public java.lang.String getPhone2Listed()
Returns whether customer's alternative phone number is listed.
Returns:
Whether customer's alternative phone number is listed.

getPhone2Type

public java.lang.String getPhone2Type()
Returns what type of phone is customer's alternative phone number.
Returns:
The phone type of the customer's alternative phone number.

getPreferredCommunication

public java.lang.String getPreferredCommunication()
Returns the customer's preferred method of communication.
Returns:
The customer's preferred method of communication.

getPreferredCurrency

public java.lang.String getPreferredCurrency()
Returns the customer's preferred currency.
Returns:
The customer's preferred currency.

getPreferredLanguage

public java.lang.String getPreferredLanguage()
Returns the customer's preferred language.
Returns:
The customer's preferred language.

getPreviouslyOrdered

public java.lang.String getPreviouslyOrdered()
Returns whether or not the customer has ordered before.
Returns:
Whether it is a returned customer.

getState

public java.lang.String getState()
Returns the customer's state or province
Returns:
The state.

getSuccessMsg

protected java.lang.String getSuccessMsg(java.util.Hashtable nlsProperty,
                                         java.lang.String userId)
Returns final success message.
Parameters:
userId -
Returns:
The success message for creating a new user.

getTitle

public java.lang.String getTitle()
Returns the customer's title. For example, Mr. or Mrs.
Returns:
The customer title.

getUserAccountStatus

public java.lang.String getUserAccountStatus()
Returns whether the customer's account status (enabled or disabled).
Returns:
The customer account status

getXMLFile

public java.lang.String getXMLFile()
Returns the XML file.
Returns:
The entire XML file in a string.

getZip

public java.lang.String getZip()
Return the customer's zip/postal code.
Returns:
The zip code.

performExecute

public void performExecute()
                    throws ECException
Performs the execution for creating a customer's information.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If user can't be created.

setNLS

public void setNLS(java.util.Hashtable newNLS)
Sets the NLS hashtable.
Parameters:
newNLS - NLS enabled translated messages.

validateParameters

public void validateParameters()
                        throws ECApplicationException
Gets XMLObject from the GUI Notebook and gets ready to parse it.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException - If the XML does not contain the required parameters