java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl | +--com.ibm.commerce.inventory.commands.FulfillmentCenterCreateCmdImpl
Default implementation of the FulfillmentCenterCreateCmd
interface. Creates a new fulfillment center.
Calls generic RedirectView when successfully executed, or GenericApplicationError view when failed.
Utilizes the following access beans:
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT The internal copyright 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.inventory.commands. FulfillmentCenterCreateCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.tools.common. ECToolsConstants |
EC_LINE_SEPARATOR,
EC_TOOLS_FULFILLMENT_CENTER_ID,
EC_TOOLS_MERCHANT_CENTER_URL,
EC_TOOLS_STORE_LANGUAGE_URL,
EC_TOOLS_STORES_ACCESS_CONTROL_REQUIRED,
EC_TOOLS_STORES_EMPTY,
EC_TOOLS_STORES_NO_ACCESS,
EC_TOOLS_STORES_NOT_ADMINISTRATOR,
EC_XML,
EC_XMLFILE,
EC_XMLFILEOBJECT,
EC_XMLOBJECT,
EC_XMLSTRING |
Constructor Summary | |
---|---|
FulfillmentCenterCreateCmdImpl() |
Method Summary | |
---|---|
protected
java.lang.String |
generateNicknameForFulfillmentCenter() Generates a nickname for FulfillmentCenter: |
protected
java.lang.String |
getAddress1() Returns fulfillment center address line 1. |
protected
java.lang.String |
getAddress2() Returns fulfillment center address line 2. |
protected
java.lang.String |
getAddress3() Returns fulfillment center address line 3. |
protected
java.lang.String |
getCity() Returns the city within this address. |
protected
java.lang.String |
getCountry() Returns the country or region within this address. |
protected
java.lang.String |
getDefaultShipOffset() Returns the value of the fulfillment center default shipped offset. |
protected
java.lang.String |
getDescription() Returns the description of the fulfillment center. |
protected
java.lang.String |
getDisplayName() Returns the display name of fulfillment center. |
protected
java.lang.String |
getFulfillmentCenterId() Returns the fulfillment center identifier. |
protected
java.lang.String |
getFulfillmentCenterName() Returns the fulfillment center name. |
protected
java.lang.String |
getLanguageId() Returns the language identifier. |
protected
java.lang.String |
getMemberId() Returns the owner identifier. |
protected
java.lang.String |
getNickname() Returns the nickname for the address. |
AccessVector |
getResources() Gets the access vector accessed by this command. |
protected
java.lang.String |
getState() Returns the state within this address. |
protected
java.lang.String |
getStoreAddressId() Returns the store address identifier. |
protected
java.lang.String |
getZipcode() Returns the ZIP code within this address. |
protected
void |
handleException(java.lang.Exception e,
java.lang.String methodName) Formats an ECException based on the input exception value. |
protected
void |
handleSubmitError(
ECException e) This method constructs and returns the error message. |
void |
performExecute() This method performs the execution of creating a new fulfillment center. |
void |
setAddress1(java.lang.String newAddress1) Sets fulfillment center address line 1. |
void |
setAddress2(java.lang.String newAddress2) Sets fulfillment center address line 2. |
void |
setAddress3(java.lang.String newAddress3) Sets fulfillment center address line 3. |
void |
setCity(java.lang.String newCity) Sets the city within this address. |
void |
setCountry(java.lang.String newCountry) Sets the country or region within this address. |
void |
setDefaultShipOffset(java.lang.String newDefaultShipOffset) Sets the value of the fulfillment center default shipped offset. |
void |
setDescription(java.lang.String newDescription) Sets the description of fulfillment center. |
void |
setDisplayName(java.lang.String newDisplayName) Sets the display name of fulfillment center. |
protected
void |
setFulfillmentCenterId(java.lang.String newFulfillmentCenterId) Sets the fulfillment center identifier. |
void |
setFulfillmentCenterName(java.lang.String newFulfillmentCenterName) Sets the fulfillment center name. |
protected
void |
setLanguageId(java.lang.String newLanguageId) Sets the language identifier. |
void |
setMemberId(java.lang.String newMemberId) Sets the owner identifier. |
protected
void |
setNickname(java.lang.String newNickname) Sets the nickname for the address. |
void |
setState(java.lang.String newState) Sets the state within this address. |
void |
setStoreAddressId(java.lang.String newStoreAddressId) Sets the store address identifier. |
void |
setZipcode(java.lang.String newZipcode) Sets the ZIP code within this address. |
void |
validateParameters() Gets the information of the new fulfillment center to be created. |
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,
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,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public FulfillmentCenterCreateCmdImpl()
Method Detail |
---|
protected java.lang.String getAddress1()
setAddress1(java.lang.String)
protected java.lang.String getAddress2()
setAddress2(java.lang.String)
protected java.lang.String getAddress3()
setAddress3(java.lang.String)
protected java.lang.String getCity()
setCity(java.lang.String)
protected java.lang.String getCountry()
setCountry(java.lang.String)
protected java.lang.String getDefaultShipOffset()
setDefaultShipOffset(java.lang.String)
protected java.lang.String getDescription()
setDescription(java.lang.String)
protected java.lang.String getDisplayName()
setDisplayName(java.lang.String)
protected java.lang.String getFulfillmentCenterId()
setFulfillmentCenterId(java.lang.String)
protected java.lang.String getFulfillmentCenterName()
setFulfillmentCenterName(java.lang.String)
protected java.lang.String getLanguageId()
setLanguageId(java.lang.String)
protected java.lang.String getMemberId()
setMemberId(java.lang.String)
protected java.lang.String getNickname()
setNickname(java.lang.String)
protected java.lang.String getState()
setState(java.lang.String)
protected java.lang.String getStoreAddressId()
setStoreAddressId(java.lang.String)
protected java.lang.String getZipcode()
setZipcode(java.lang.String)
public void setAddress1(java.lang.String newAddress1)
FulfillmentCenterCreateCmd
setAddress1
in interface
FulfillmentCenterCreateCmd
newAddress1
- address line 1getAddress1()
public void setAddress2(java.lang.String newAddress2)
FulfillmentCenterCreateCmd
setAddress2
in interface
FulfillmentCenterCreateCmd
newAddress2
- address line 2getAddress2()
public void setAddress3(java.lang.String newAddress3)
FulfillmentCenterCreateCmd
setAddress3
in interface
FulfillmentCenterCreateCmd
newAddress3
- address line 3getAddress3()
public void setCity(java.lang.String newCity)
FulfillmentCenterCreateCmd
setCity
in interface
FulfillmentCenterCreateCmd
newCity
- citygetCity()
public void setCountry(java.lang.String newCountry)
FulfillmentCenterCreateCmd
setCountry
in interface
FulfillmentCenterCreateCmd
newCountry
- country or regiongetCountry()
public void setDefaultShipOffset(java.lang.String newDefaultShipOffset)
FulfillmentCenterCreateCmd
setDefaultShipOffset
in interface
FulfillmentCenterCreateCmd
newDefaultShipOffset
- default shipped offsetgetDefaultShipOffset()
public void setDescription(java.lang.String newDescription)
FulfillmentCenterCreateCmd
setDescription
in interface
FulfillmentCenterCreateCmd
newDescription
- descriptiongetDescription()
public void setDisplayName(java.lang.String newDisplayName)
FulfillmentCenterCreateCmd
setDisplayName
in interface
FulfillmentCenterCreateCmd
newDisplayName
- display namegetDisplayName()
protected void setFulfillmentCenterId(java.lang.String newFulfillmentCenterId)
newFulfillmentCenterId
- idgetFulfillmentCenterId()
public void setFulfillmentCenterName(java.lang.String newFulfillmentCenterName)
FulfillmentCenterCreateCmd
setFulfillmentCenterName
in interface
FulfillmentCenterCreateCmd
newFulfillmentCenterName
- namesetFulfillmentCenterName(java.lang.String)
protected void setLanguageId(java.lang.String newLanguageId)
newLanguageId
- language idgetLanguageId()
public void setMemberId(java.lang.String newMemberId)
FulfillmentCenterCreateCmd
setMemberId
in interface
FulfillmentCenterCreateCmd
newMemberId
- owner idgetMemberId()
protected void setNickname(java.lang.String newNickname)
newNickname
- address nicknamegetNickname()
public void setState(java.lang.String newState)
FulfillmentCenterCreateCmd
setState
in interface
FulfillmentCenterCreateCmd
newState
- stategetState()
public void setStoreAddressId(java.lang.String newStoreAddressId)
newStoreAddressId
- address idgetStoreAddressId()
public void setZipcode(java.lang.String newZipcode)
FulfillmentCenterCreateCmd
setZipcode
in interface
FulfillmentCenterCreateCmd
newZipcode
- postal codegetZipcode()
public void validateParameters() throws ECException
Verify that the required parameters are available, and that the fulfillment center member id and name are unique.
Sets the information into the command local variable.
Calls generic * RedirectView when successfully completed, or GenericApplicationError view when failed.
Although the schema allows NAME column of FFMCENTER to be NULL, this command forces the fulfillmentCenterName parameter to be NOT NULL because a unique fulfillment center name in string format is required to generate a unique nickname for staddress of this fulfillment center.
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
- Throws ECApplicationException if
_ERR_BAD_MISSING_CMD_PARAMETERpublic AccessVector getResources() throws ECException
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
ECException
public void performExecute() throws ECException
Adds a new row in STADDRESS
table using
CreateStoreAddressCmd
. Adds a row in FFMCENTER
table
using FulfillmentCenterAccessBean. Gets a new fulfillment center id. Adds a row
to FFMCENTDS
table using FulfillmentCenterDescriptionAccessBean.
Adds a new row in SHPARRANGE
table using
ShippingArrangementAccessBean.
Sets generic RedirectView when successfully executed, or GenericApplicationError view when failed.
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
protected java.lang.String generateNicknameForFulfillmentCenter()
<name1>?<lang_id>?<type> where <name1> = FFMCenter.Name <lang_id> = language_id <type> = "FulfillmentCenterLocation".
protected void handleException(java.lang.Exception e, java.lang.String methodName) throws ECException
e
- Exception - The exception instance to be formatted.methodName
- String - The name of the method from which this
method was called.ECException
- - could be one of many different exceptions: ECApplicationException.
RemoteException, CreateException, FinderException, or
NamingException.protected void handleSubmitError(ECException e) throws ECApplicationException
e
- exceptioncom.ibm.commerce.exception.ECApplicationException.
- Throw
ECApplicationException with the newly constructed message.
ECApplicationException