com.ibm.commerce.contract.commands
Class ConfigurePaymentManagerCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.contract.commands.ConfigurePaymentManagerCmdImpl
All Implemented Interfaces:
ConfigurePaymentManagerCmd, ECCommand, ECTargetableCommand, TaskCommand

public class ConfigurePaymentManagerCmdImpl
extends TaskCommandImpl
implements ConfigurePaymentManagerCmd

Configures the WebSphere Commerce Payments. (WebSphere Commerce Business Edition only)

Configures the WebSphere Commerce Payments based on the element PaymentsInformation in the store XML definition file. If an error occurrs during configuration, an ECException will be thrown.

Calling commands: DeployContractCmd.

Curretly supported cassettes:

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The full qualified name of this class (com.ibm.commerce.contract.commands.ConfigurePaymentManagerCmdImpl).
static java.lang.String COPYRIGHT
          The internal copyright field.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.contract.commands. ConfigurePaymentManagerCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
ConfigurePaymentManagerCmdImpl()
           
 
Method Summary
 void performExecute()
           Configures the WCP (Websphere Commerce Payments).
 void setDebug(boolean b)
           Sets if in debug mode.
 void setPaymentInformationElement(org.w3c.dom.Element element)
           Sets the payment information XML element.
 void setStoreId(java.lang.String storeId)
           Sets the store ID.
 void setStoreIdentity(java.lang.String storeIdentity)
           Sets the store Identity.
 void setStoreSupportedCurrencies(java.lang.String[] curs)
           Sets the currencies supported by the store being configured.
 void validateParameters()
           Validates the parameters for this command.
 
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
 

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

CLASSNAME

public static final java.lang.String CLASSNAME
The full qualified name of this class (com.ibm.commerce.contract.commands.ConfigurePaymentManagerCmdImpl).
See Also:
Constant Field Values
Constructor Detail

ConfigurePaymentManagerCmdImpl

public ConfigurePaymentManagerCmdImpl()
Method Detail

performExecute

public void performExecute()
                    throws ECException

Configures the WCP (Websphere Commerce Payments).

Before this method is invoked, the caller must call the following methods first:

As for any other command, setCommandContext(...), must be called before this method is invoked too.

Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECExpection - thrown whenever an error occurs (communication error, wrong user access, etc)
ECException

setPaymentInformationElement

public void setPaymentInformationElement(org.w3c.dom.Element element)

Sets the payment information XML element.

All the payment information is obtained from XML children of this XML Element.

This method should be called before performExecute() is called.

Specified by:
setPaymentInformationElement in interface ConfigurePaymentManagerCmd
Parameters:
element - the PaymentInformationElement from the store XML file

setStoreId

public void setStoreId(java.lang.String storeId)

Sets the store ID.

The store ID is the payment merchant number.

This method should be called before performExecute() is called.

Specified by:
setStoreId in interface ConfigurePaymentManagerCmd
Parameters:
storeId - the target store identifier; the merchant number in WC Payments terms

setStoreIdentity

public void setStoreIdentity(java.lang.String storeIdentity)

Sets the store Identity.

The Store Identity is the payment merchant title.

If store identity's length is greater than 128 bytes, only the first 128 bytes will be used as the merchant title.

This method should be called before performExecute() is called.

Specified by:
setStoreIdentity in interface ConfigurePaymentManagerCmd
Parameters:
storeIdentity - the target store identity

setStoreSupportedCurrencies

public void setStoreSupportedCurrencies(java.lang.String[] curs)

Sets the currencies supported by the store being configured.

This method should be called before performExecute() is called.

Specified by:
setStoreSupportedCurrencies in interface ConfigurePaymentManagerCmd
Parameters:
curs - the currencies supported by the store

validateParameters

public void validateParameters()
                        throws ECException

Validates the parameters for this command.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - thrown if PaymentInfoElement, storeId or store identity is null

setDebug

public void setDebug(boolean b)

Sets if in debug mode.

Specified by:
setDebug in interface ConfigurePaymentManagerCmd
Parameters:
b - the new state of the debug mode; the default value is false