Class UserRegistrationAdminAddCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.ControllerCommandImpl
-
- com.ibm.commerce.usermanagement.commands.UserRegistrationCmdImpl
-
- com.ibm.commerce.usermanagement.commands.UserRegistrationAdminCmdImpl
-
- com.ibm.commerce.usermanagement.commands.UserRegistrationAdminAddCmdImpl
-
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, UserRegistrationAdminAddCmd, UserRegistrationAdminCmd, UserRegistrationCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class UserRegistrationAdminAddCmdImpl extends UserRegistrationAdminCmdImpl implements UserRegistrationAdminAddCmd
The UserRegistrationAdminAdd command allows an administrator to create a new registered user, or register an existing guest user.If userId is specified, and that user is a guest user, this command will register that user. Alternatively, if that user is a registered user, this command will act as UserRegistrationAdminUpdate to update information of the specified registered user.
To run this command, the administrator must login first. After a user is created, the user is not automatically logged on, i.e., the new user does not become the current user in the command context.
A B2B user can be created by specified profileType equals to 'B'. To register a user under an organization or organizational unit, specify the parameter parentMemberId to the orgEntityId of the organization or organizational unit.
The information of the new user is stored in the MEMBER, USERS, USERREG, MBRREL, USERPROF, BUSPROF, USERDEMO and ADDRESS tables.
Use this command with SSL (Secure Sockets Layer) to ensure that the information are encrypted. To do so type the command with the HTTPS secure protocol.
The parameter URL, logonId, logonPassword and logonPasswordVerify are mandatory. The rest of the parameters are all optional.
Behavior
- Calls an empty task command PreUserRegistrationAdminAddCmd. Store Developers can overwrite it change the input to the command.
- Create a new record in USERS table with Registration Type as 'R' (registered) and populates Distinguished Name.
- Create a new record in USERREG table. If Authentication Mode is 'LDAP', the logonId field in USERREG table stores the Distinguished Name of the user and the logon password is only stored in LDAP server, not in the USERREG table.
- Member relationship information is stored in MBRREL table.
- If any field related to USERPROF, BUSPROF and USERDEMO is specified, a new record will be created in these tables, otherwise, no record will be created.
- If any field related to ADDRESS table is specified, a self address (also called register address, with
selfAddress field set to '1' and nick name is same as logonId) will be created. Otherwise no record will be created in
the ADDRESS table.
Each user can have at most one self address. - Calls a task command ProcessParentMemberCmd to validate parentMemberId.
- Calls a task command ProcessProfileTypeCmd to determinate and validate profileType.
If profileType is not specified, and parentMember is not specified or is Default Organization, by default, the profileType is set to "C" and a B2C user will be created;
If profileType is not specified and parentMember is not Default Organization, by default, the profileType is set to "B" and a B2B user will be created. - Calls a task command AuthenticationPolicyCmd to performs verification or update of a user credentials.
- If passwordExpired is not specified, default is 0 (Not Expired).
- If status is not specified, default is 1 (Enabled).
- If preferredCurrency is not specified, default is the preferred currency in command context.
- If policyAccountId is not specified, default is -1.
- If a new address need to be created but addressType is not specified, default is '
SB
' (Shipping and Billing address). - Check the required registration information parameters.
- Calls a task command AuditUserRegistrationCmd task to check the additional parameters. Store Developers need to add new code to the task command if they want to customizable check.
- If the authentication mode is 'LDAP', a user entry will be created in the LDAP server.
- If the command fails, the UserRegistrationErrorView view command is called. Upon successful completion, the specified URL is called.
- Calls an empty task command PostUserRegistrationAdminAddCmd. Store Developers can overwrite it to perform additional operations.
- V8+ : when
resetPassword=true
inCMDREG
table: It calls ResetPasswordAdministratorCmd to reset the new user's password.
Exception Conditions
- URL is null (_ERR_CMD_MISSING_PARAM).
- The length of URL length equals 0 (_ERR_CMD_INVALID_PARAM).
- logonId is null (_ERR_CMD_MISSING_PARAM).
- The length of logonId equals 0 (_ERR_CMD_INVALID_PARAM).
- logonId already exists in database (
EC_UREG_ERR_LOGONID_EXISTS
). - In LDAP Mode, the formulated Distinguished Name already exist in LDAP Sever or WCS Database (_ERR_RDN_ALREADY_EXIST).
- logonPassword is null (_ERR_CMD_MISSING_PARAM).
- The length of logonPassword equals 0 or greater than 70 (_ERR_CMD_INVALID_PARAM).
- logonPasswordVerify is null (_ERR_CMD_MISSING_PARAM).
- logonPassword is not equal to logonPasswordVerify (
EC_UREG_ERR_PASSWORDS_NOT_SAME
). - profileType is not null and not equal to 'B' or 'C' (_ERR_CMD_INVALID_PARAM).
- parentMemberId is not null and not a foreign key set to the ORGENTITY table (_ERR_CMD_INVALID_PARAM).
- status is not null and does not equals to '1' or '0'(_ERR_CMD_INVALID_PARAM).
- passwordExpired is not null and does not equals to '1' or '0' (_ERR_CMD_INVALID_PARAM).
- passwordRetries is not null and is not an integer (_ERR_CMD_INVALID_PARAM).
- policyAccountId is not null and is not a foreign key set to the PLCYACCT table (_ERR_CMD_INVALID_PARAM).
- preferredCurrency is not null and not a foreign key set to the
SETCCURR
table (_ERR_CMD_INVALID_PARAM). - preferredLanguage is not null and not a foreign key set to the LANGUAGE table (_ERR_CMD_INVALID_PARAM).
- age, income, children, household, demographicField6, publishPhone1, publishPhone2, and packageSupression is not null and not an integer (_ERR_CMD_INVALID_PARAM).
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
CLASSNAME
The name of this implementation of the command.static java.lang.String
COPYRIGHT
IBM Copyright notice field.-
Fields inherited from interface com.ibm.commerce.usermanagement.commands.UserRegistrationAdminAddCmd
NAME
-
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
-
-
Constructor Summary
Constructors Constructor and Description UserRegistrationAdminAddCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
performExecute()
Executes the command.void
setRequestProperties(TypedProperty reqProperties)
Sets the request properties and calls the PreUserRegistrationAdmimAdd command to perform any needed tasks before the user is created.-
Methods inherited from class com.ibm.commerce.usermanagement.commands.UserRegistrationAdminCmdImpl
checkAdminRegistrationParameters, validateParameters
-
Methods inherited from class com.ibm.commerce.usermanagement.commands.UserRegistrationCmdImpl
checkAddParameters, checkCommonParameters, checkSelfRegistrationParameters, checkUpdateParameters, formulateDN, getAddress1, getAddress2, getAddress3, getAddressType, getAuthenticateMode, getBestCallingTime, getBillingCode, getBillingCodeType, getBusinessTitle, getCity, getCountry, getCreatedTimestamp, getEmail1, getEmail2, getFax1, getFax2, getFirstName, getLastName, getMiddleName, getMobilePhone1, getMobilePhone1Country, getOfficeAddress, getOrganizationName, getOrganizationUnitName, getPackageSuppression, getPersonTitle, getPhone1, getPhone1Type, getPhone2, getPhone2Type, getPrimary, getProfileType, getPublishPhone1, getPublishPhone2, getRequestProperties, getResources, getState, getStatus, getURL, getViewInputProperties, getWorkingUserId, getZipCode, isLogonIdExist, isLogonIdExist, isLogonIdUnique, isReadyToCallExecute, reset, setAddress1, setAddress2, setAddress3, setAddressField1, setAddressField2, setAddressField3, setAddressType, setAge, setAge, setAlternateId, setAuthenticateMode, setBestCallingTime, setBillingCode, setBillingCodeType, setBillingCodeTypeType, setBusinessTitle, setChallengeAnswer, setChallengeQuestion, setChildren, setChildren, setCity, setCompanyName, setCountry, setCreatedTimestamp, setDateOfBirth, setDemographicsField1, setDemographicsField2, setDemographicsField3, setDemographicsField4, setDemographicsField5, setDemographicsField6, setDemographicsField6, setDemographicsField7, setDepartmentNumber, setDescription, setDisplayName, setDistinguishedName, setEmail1, setEmail2, setEmployeeId, setEmployeeType, setEncipheredMerchantKey, setFax1, setFax2, setFirstName, setGender, setHobbies, setHousehold, setHousehold, setIncome, setIncome, setIncomeCurrency, setLastName, setLogonId, setLogonPassword, setLogonPasswordVerify, setLogonPasswordVerifyVerify, setManager, setMaritalStatus, setMerchantKey, setMiddleName, setMobilePhone1, setMobilePhone1Country, setNickName, setOfficeAddress, setOrderBefore, setOrganizationId, setOrganizationId, setOrganizationName, setOrganizationUnitId, setOrganizationUnitId, setOrganizationUnitName, setPackageSuppression, setPackageSuppression, setPasswordExpired, setPasswordExpired, setPersonTitle, setPhone1, setPhone1Type, setPhone2, setPhone2Type, setPhoto, setPreferredCommunication, setPreferredCurrency, setPreferredDelivery, setPreferredLanguage, setPreferredLanguage, setPreferredMeasure, setPrimary, setPrimary, setProfileType, setPublishPhone1, setPublishPhone1, setPublishPhone2, setPublishPhone2, setReceiveSMSNotification, setSecretary, setShippingGeoCode, setState, setStatus, setTaxGeoCode, setTaxPayerId, setTimeZone, setURL, setUserField1, setUserField2, setUserField3, setUserProfileField1, setUserProfileField2, setUserStatus, setUserStatus, setWorkingUserId, setZipCode
-
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
-
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, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.commerce.usermanagement.commands.UserRegistrationCmd
getAddress1, getAddress2, getAddress3, getAddressType, getAuthenticateMode, getBestCallingTime, getBillingCode, getBillingCodeType, getBusinessTitle, getCity, getCountry, getCreatedTimestamp, getEmail1, getEmail2, getFax1, getFax2, getFirstName, getLastName, getMiddleName, getMobilePhone1, getMobilePhone1Country, getOfficeAddress, getOrganizationName, getOrganizationUnitName, getPackageSuppression, getPersonTitle, getPhone1, getPhone1Type, getPhone2, getPhone2Type, getPrimary, getProfileType, getPublishPhone1, getPublishPhone2, getState, getStatus, getWorkingUserId, getZipCode, reset, setAddress1, setAddress2, setAddress3, setAddressField1, setAddressField2, setAddressField3, setAddressType, setAge, setAge, setAlternateId, setAuthenticateMode, setBestCallingTime, setBillingCode, setBillingCodeType, setBusinessTitle, setChallengeAnswer, setChallengeQuestion, setChildren, setChildren, setCity, setCompanyName, setCountry, setCreatedTimestamp, setDateOfBirth, setDemographicsField1, setDemographicsField2, setDemographicsField3, setDemographicsField4, setDemographicsField5, setDemographicsField6, setDemographicsField6, setDemographicsField7, setDepartmentNumber, setDescription, setDisplayName, setDistinguishedName, setEmail1, setEmail2, setEmployeeId, setEmployeeType, setEncipheredMerchantKey, setFax1, setFax2, setFirstName, setGender, setHobbies, setHousehold, setHousehold, setIncome, setIncome, setIncomeCurrency, setLastName, setLogonId, setLogonPassword, setLogonPasswordVerify, setManager, setMaritalStatus, setMerchantKey, setMiddleName, setMobilePhone1, setMobilePhone1Country, setOfficeAddress, setOrderBefore, setOrganizationId, setOrganizationId, setOrganizationName, setOrganizationUnitId, setOrganizationUnitId, setOrganizationUnitName, setPackageSuppression, setPackageSuppression, setPasswordExpired, setPasswordExpired, setPersonTitle, setPhone1, setPhone1Type, setPhone2, setPhone2Type, setPhoto, setPreferredCommunication, setPreferredCurrency, setPreferredDelivery, setPreferredLanguage, setPreferredLanguage, setPreferredMeasure, setPrimary, setPrimary, setProfileType, setPublishPhone1, setPublishPhone1, setPublishPhone2, setPublishPhone2, setReceiveSMSNotification, setSecretary, setShippingGeoCode, setState, setStatus, setTaxGeoCode, setTaxPayerId, setTimeZone, setURL, setUserField1, setUserField2, setUserField3, setUserProfileField1, setUserProfileField2, setUserStatus, setUserStatus, setWorkingUserId, setZipCode
-
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
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, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
-
-
-
-
Field Detail
-
COPYRIGHT
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 this implementation of the command.- See Also:
- Constant Field Values
-
-
Method Detail
-
setRequestProperties
public void setRequestProperties(TypedProperty reqProperties) throws ECApplicationException
Sets the request properties and calls the PreUserRegistrationAdmimAdd command to perform any needed tasks before the user is created.- Specified by:
setRequestProperties
in interfaceControllerCommand
- Overrides:
setRequestProperties
in classUserRegistrationCmdImpl
- Parameters:
reqProperties
- the parameters passed to the command.- Throws:
ECApplicationException
- If there was a problem executing the PreUserRegistationAdminAdd command.
-
performExecute
public void performExecute() throws ECException
Executes the command.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classUserRegistrationAdminCmdImpl
- Throws:
ECException
- See Also:
TargetableCommand.performExecute()
-
-