java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.usermanagement.commands.ResellerRegistrationAddCmdImpl
This command is used to perform reseller organization registration. Because the implementation calls organization registration command and user registration command, the parameters on request properties are prefixed with org_ and usr_ in order to separate the parameters. The non prefixed names of attributes are same as for commands OrgEntityAddCmd and UserRegistrationAddCmd.
Behavior
org_
to the
ResellerOrgEntityRegistrationAdd
, and the properties prefixed
with usr_
to the ResellerUserRegistrationAdd
. The
result is the creation of a new Reseller organization, and a user under that
organization.Exception Conditions
ResellerOrgEntityRegistrationAdd
cannot be resolved
(_ERR_CMD_CMD_NOT_FOUND).ResellerUserRegistrationAdd
cannot be resolved
(_ERR_CMD_CMD_NOT_FOUND).orgEntityId
from creating the OrgEntity is
null. (_ERR_MISSING_CMD_PARAMETER)userId
from creating the User is null.
(_ERR_MISSING_CMD_PARAMETER)
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
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.usermanagement.commands. ResellerRegistrationAddCmd |
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
ResellerRegistrationAddCmdImpl() Constructor for ResellerRegistrationAddCmdImpl. |
Method Summary | |
---|---|
protected
void |
assignRolesToMemberInOrg(java.lang.Long memberId,
java.lang.Long orgEntityId, java.lang.Integer[] roles) Assign roles of an organization to a member specified by memberId. |
protected
void |
createMemberGroupForApprovals(java.lang.Long orgentity_id,
java.lang.Long user_id) Sets up the member group, UserRegistrationApprovalGroup, for approval. |
java.lang.Long |
getUniqueUserId() Creates a new guest user, and returns the userId of this user. |
boolean |
isGeneric() Checks if this is a generic command. |
boolean |
isRetriable() Checks if this command is retriable on transaction rollback exception. |
void |
performExecute() Executes the command. |
protected
void |
prepareRequestProperties() Prepares the request properties. |
protected
void |
setRegisterTypeForUser(java.lang.String user_id) Set the register type of the user depending on whether the user is a site administrator or any other administrator. |
void |
setRequestProperties(
TypedProperty reqProperties) Sets the request properties for this command. |
protected
void |
setResellerOrgParent() Sets the reseller organization parent in the request properties, based on the values in the MemberRegistrationAttributes.xml. |
void |
setViewInputProperties(
TypedProperty reqProperties) Sets the input properties to be passed to the view command. |
void |
validateParameters() Performs server side parameter checking. |
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
getViewInputProperties,
mergeProperties,
setForUserId,
setGeneric,
setOwner,
setResponseProperties,
setRetriable |
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 |
execute |
Methods inherited from interface com.ibm.commerce.command. AccCommand |
accessControlCheck,
getAccCheck,
setAccCheck |
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
Constructor Detail |
---|
public ResellerRegistrationAddCmdImpl()
Method Detail |
---|
public void setRequestProperties(TypedProperty reqProperties) throws ECException
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
ControllerCommandImpl
ECException
public void validateParameters() throws ECException
ECCommand
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
ECCommand.validateParameters()
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
com.ibm.sfc.cmd.TargetableCommand#performExecute()
public boolean isGeneric()
ControllerCommandImpl
isGeneric
in interface
ControllerCommand
isGeneric
in class
ControllerCommandImpl
ControllerCommand.isGeneric()
public boolean isRetriable()
ControllerCommandImpl
isRetriable
in interface
ControllerCommand
isRetriable
in class
ControllerCommandImpl
ControllerCommand.isRetriable()
protected void prepareRequestProperties()
protected void assignRolesToMemberInOrg(java.lang.Long memberId, java.lang.Long orgEntityId, java.lang.Integer[] roles) throws ECException
memberId
- the member that roles are to be assigned toorgEntityId
- the organization that the roles are to be
playedroles
- a list of roles to be assignedECException
protected void setResellerOrgParent() throws ECSystemException
ECSystemException
protected void createMemberGroupForApprovals(java.lang.Long orgentity_id, java.lang.Long user_id)
orgentity_id
- The organization that the member group belongs
to.user_id
- The user in the member group.protected void setRegisterTypeForUser(java.lang.String user_id)
user_id
- The userId of the user for whom the register type
will be set.public void setViewInputProperties(TypedProperty reqProperties) throws ECException
setViewInputProperties
in interface
ControllerCommand
setViewInputProperties
in class
ControllerCommandImpl
com.ibm.commerce.exception.ECException.
ECException
public java.lang.Long getUniqueUserId() throws ECException
com.ibm.commerce.exception.ECException.
ECException