com.ibm.commerce.tools.optools.user.commands
Class CSRCustomerEnableAccountCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.tools.command.ToolsControllerCommandImpl
|
+--com.ibm.commerce.tools.optools.user.commands.CSRCustomerEnableAccountCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, CSRCustomerEnableAccountCmd, ECCommand, ECTargetableCommand, Protectable, ToolsControllerCommand
- public class CSRCustomerEnableAccountCmdImpl
- extends ToolsControllerCommandImpl
- implements CSRCustomerEnableAccountCmd
Enables a customer's account by calling UserRegistrationAdminUpdateCmd.
URL calling syntax:
- Https://host_name/path/CSRCustomerEnableAccountCmd?XML=xml_string&URL=return_url
Parameters:
- XML
- An input xml_string that contains the all required data for enabling a customer's account.
Example xml_string:
<?xml version="1.0" encoding "UTF-8">
<profileInfo>
<logonId>Smith</logonId>
</profileInfo>
<customerId>7777</customerId>
<locale>en_US</locale>
<account>ABC</account>
<cmdStatus>1</cmdStatus>
</xml>
- URL
- The URL to be called when the command completes successfully.
Field Summary |
static java.lang.String |
COPYRIGHT
copyright notice |
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. |
void |
executeUserRegistrationAdminUpdate()
Calls UserRegistrationAdminUpdateCmd to enable the user's account |
java.lang.String |
getAccount()
Returns the customer's account. |
java.lang.String |
getCmdStatus()
Returns the customer's account status. |
java.lang.String |
getCustomerId()
Returns the customer's id. |
java.lang.String |
getLocale()
Returns the customer's locale. |
java.lang.String |
getLogonId()
Returns the customer's logon id. |
java.util.Hashtable |
getNLS()
Return the properties containing all translatable messages for this command. |
TypedProperty |
getViewInputProperties()
This method is called by the web controller to retrieve the request properties set
by the setRequestProperties() method. |
java.lang.String |
getXMLFile()
Return the XML file. |
void |
performExecute()
This method performs the execution for enabling a customer's account status. |
void |
setNLS(java.util.Hashtable newNLS)
Sets the NLS hashtable. |
void |
validateParameters()
Gets XMLObject from the GUI Dialog and gets ready to parse it. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- copyright notice
CSRCustomerEnableAccountCmdImpl
public CSRCustomerEnableAccountCmdImpl()
- Default Constructor
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 exceptioncmdName
- The command that generates the exception- Returns:
- The response typed property of the exception
- Throws:
ECApplicationException
-
executeUserRegistrationAdminUpdate
public void executeUserRegistrationAdminUpdate()
throws java.lang.Exception
- Calls UserRegistrationAdminUpdateCmd to enable the user's account
- Throws:
ECApplicationException
- If the UserRegistrationAdminUpdateCmd command cannot be found.
getAccount
public java.lang.String getAccount()
- Returns the customer's account.
- Returns:
- java.lang.String
getCmdStatus
public java.lang.String getCmdStatus()
- Returns the customer's account status.
- Returns:
- java.lang.String
getCustomerId
public java.lang.String getCustomerId()
- Returns the customer's id.
- Returns:
- java.lang.String
getLocale
public java.lang.String getLocale()
- Returns the customer's locale.
- Returns:
- java.lang.String
getLogonId
public java.lang.String getLogonId()
- Returns the customer's logon id.
- Returns:
- java.lang.String
getNLS
public java.util.Hashtable getNLS()
- Return the properties containing all translatable messages for this command.
- Returns:
- java.util.Hashtable Name value pairs of translatable messages.
getViewInputProperties
public TypedProperty getViewInputProperties()
- This method is called by the web controller to retrieve the request properties set
by the setRequestProperties() method.
The tools need to override this method because otherwise the properties passed into
the controller command would be then passed onto the view command. This is unnecessary
for the tools and actually will break us when using the ReDirectView comman because
the URL to re-direct to cannot be more than 500 chars. The XML parameter alone passed
into the controller command is longer than this and therefore without overriding this
method we couldn't re-direct to the view command.
- Specified by:
getViewInputProperties
in interface ControllerCommand
- Overrides:
getViewInputProperties
in class ToolsControllerCommandImpl
- Returns:
- com.ibm.commerce.datatype.TypeProperty
getXMLFile
public java.lang.String getXMLFile()
- Return the XML file.
- Returns:
- The entire XML file.
performExecute
public void performExecute()
throws ECException
- This method performs the execution for enabling a customer's account status.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Throws:
ECException
-
setNLS
public void setNLS(java.util.Hashtable newNLS)
- Sets the NLS hashtable.
- Parameters:
newNLS
- java.util.Hashtable
validateParameters
public void validateParameters()
throws ECApplicationException
- Gets XMLObject from the GUI Dialog 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