com.ibm.commerce.orderquotation.commands
Class OrderQuotationRequestCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.orderquotation.commands.OrderQuotationRequestCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderQuotationRequestCmd

public class OrderQuotationRequestCmdImpl
extends ControllerCommandImpl
implements OrderQuotationRequestCmd

Requests order quotations for shopping carts.

See Also:
Serialized Form

Field Summary
 
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.orderquotation.commands. OrderQuotationRequestCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Constructor Summary
OrderQuotationRequestCmdImpl()
           
 
Method Summary
 java.lang.String[] getDeleteOrderQuotationRelIds()
          Gets the order quotation rel ids to be deleted.
 java.lang.String[] getOrderIds()
          Gets the shopcarts for which quotations are to be requested.
 java.lang.String[] getOutOrderQuotationRelIdName()
          Gets the outOrderQuotationRelIdName.
 java.util.Hashtable getQuotationContractIds()
          Gets the quotationContractIds map.
 java.util.Hashtable getQuotationPasswords()
          Gets the quotationPasswords map.
 java.util.Hashtable getQuotationStoreIds()
          Gets the quotationStoreIds map.
 java.lang.String getQuotationType()
          Gets the quotation type.
 java.util.Hashtable getQuotationUserIds()
          Gets the quotationUserIds map.
  AccessVector getResources()
          Gets the vector of resources accessed by this command.
 java.lang.String getURL()
          Gets the URL
 void performExecute()
          Executes the command.
 void reset()
          Resets the command.
 void setDeleteOrderQuotationRelIds(java.lang.String[] deleteOrderQuotationRelIds)
          (Optional) Sets the order quotation rel ids to be deleted along with their child Orders, if their type is either "initial" or "final", and if their parent Orders are one of the shopcarts specified by the orderId parameter.
 void setOrderIds(java.lang.String[] orderIds)
          (Optional) Sets the shopcarts for which quotations are to be requested.
 void setOutOrderQuotationRelIdName(java.lang.String[] outOrderQuotationRelIdName)
          (Optional) Sets the outOrderQuotationRelIdName.
 void setQuotationContractIds(java.util.Hashtable quotationContractIds)
          (Optional) Sets the quotationContractIds.
 void setQuotationPasswords(java.util.Hashtable quotationPasswords)
          (Optional) Sets the quotationPasswords.
 void setQuotationStoreIds(java.util.Hashtable quotationStoreIds)
          (Optional) Sets the quotationStoreIds.
 void setQuotationType(java.lang.String quotationType)
          (Optional) Sets the quotation type.
 void setQuotationUserIds(java.util.Hashtable quotationUserIds)
          (Optional) Sets the quotationUserIds.
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the requestProperties for the command.
 void setURL(java.lang.String URL)
          Sets the URL
 void validateParameters()
          Checks mandatory parameters.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, 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, 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, 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
 

Constructor Detail

OrderQuotationRequestCmdImpl

public OrderQuotationRequestCmdImpl()
Method Detail

getURL

public java.lang.String getURL()
Gets the URL
Returns:
The URL

setURL

public void setURL(java.lang.String URL)
Sets the URL
Parameters:
URL - The URL to set

reset

public void reset()
Resets the command.
Overrides:
reset in class AbstractECTargetableCommand

validateParameters

public void validateParameters()
                        throws ECException
Checks mandatory parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException - Raised with message _ERR_BAD_MISSING_CMD_PARAMETER if storeId, URL is not specified or quotationType is not valid.
ECException

performExecute

public void performExecute()
                    throws ECException
Executes the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECSystemException - Raised with message _ERR_CREATE_EXCEPTION if there is a javax.ejb.CreateException, _ERR_FINDER_EXCEPTION if there is a javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a javax.naming.NamingException, _ERR_REMOTE_EXCEPTION if there is a java.rmi.RemoteException.
ECException

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECException
Sets the requestProperties for the command.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
aRequestProperties - The request properties. This parameter includes the following name value pairs:
quotationType (optional, default=initial)
The type of quotation requested. Valid values: initial, final.
orderId (optional, default=. (the current pending Orders))
The shopcarts for which quotations are to be requested. Valid values: list of (OrderId | Order abbreviation)
quotationStoreId_<i> (optional)
The Stores from which quotations are to be requested. Stores that are not quote enabled under the Contract specified by the quotationContractId_<i> parameter for the current user in the current Store are ignored.
quotationContractId_<i> (optional, default=The default Contract for the Store indicated by quotationStoreId_<i>)
The Contract that contain a ReferralInterfaceTCs that indicates a PolicyCommand to be used to obtain a quotation. A system exception is thrown if a specified Contract does not contain such a ReferralInterfaceTC, or is not deployed in the Store indicated by quotationStoreId_<i>. Ignored if quotationStoreId_<i> is not specified.
quotationUserId_<i> (optional)
A user ID to be sent with the quotation request sent to the Store indicated by quotationStoreId_<i> for the Contract indicated by quotationContract_<i>. Ignored if quotationStoreId_<i> is not specified.
quotationPassword_<i> (optional)
A password for the user ID specified by the quotationUserId_<i> parameter. Ignored if quotationStoreId_<i> is not specified.
outOrderQuotationRelIdName (optional)
The names of name value pairs that should be added to the redirection URL. The values of the added name value pairs are the identifiers of the OrderQuotationRel objects created by this command invocation.
URL
The redirection URL that is returned when the command successfully completes.
Throws:
ECException - These exceptions are allowed to percolate.

getResources

public AccessVector getResources()
                          throws ECException
Gets the vector of resources accessed by this command.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
The vector of resource action pairs - Parent orders (shopping carts).
Throws:
ECException - These exceptions are allowed to percolate.

getOrderIds

public java.lang.String[] getOrderIds()
Gets the shopcarts for which quotations are to be requested.
Returns:
The array of order ids.

setOrderIds

public void setOrderIds(java.lang.String[] orderIds)
(Optional) Sets the shopcarts for which quotations are to be requested. If not specified, the default is "." (the current pending orders).
Parameters:
orderIds - The orderIds of the shopcarts.

getQuotationType

public java.lang.String getQuotationType()
Gets the quotation type.
Returns:
The quotation type.

setQuotationType

public void setQuotationType(java.lang.String quotationType)
(Optional) Sets the quotation type. If not specified, the default is "initial".
Parameters:
quotationType - The quotation type to set.

setQuotationStoreIds

public void setQuotationStoreIds(java.util.Hashtable quotationStoreIds)
(Optional) Sets the quotationStoreIds. This parameter is a map where the key is an Integer and the entry at any key is a quotation store id. The keys should not include the integer 0.
Parameters:
quotationStoreIds - The map of quotationStoreIds to set. This map and the other 3 maps should have the corresponding set of data for a request all at the same key value.

getQuotationStoreIds

public java.util.Hashtable getQuotationStoreIds()
Gets the quotationStoreIds map. This parameter is a map where the key is an Integer and the entry at any key is a quotation store id.
Returns:
The quotationStoreIds map.

getQuotationContractIds

public java.util.Hashtable getQuotationContractIds()
Gets the quotationContractIds map. This parameter is a map where the key is an Integer and the entry at any key is a quotation contract id. The key is used to map the appropriate quotation contract id to its matching quotation store id.
Returns:
The quotationContractIds map.

setQuotationContractIds

public void setQuotationContractIds(java.util.Hashtable quotationContractIds)
(Optional) Sets the quotationContractIds. This parameter is a map where the key is an Integer and the entry at any key is a quotation contract id. The key is used to map the appropriate quotation contract id to its matching quotation store id. The keys should not include the integer 0.
Parameters:
quotationContractIds - The map of quotationContractIds to set. This map and the other 3 maps should have the corresponding set of data for a request all at the same key value.

getQuotationUserIds

public java.util.Hashtable getQuotationUserIds()
Gets the quotationUserIds map. This parameter is a map where the key is an Integer and the entry at any key is a quotation userid. The key is used to map the appropriate quotation userid to its matching quotation store id.
Returns:
The quotationUserIds map.

setQuotationUserIds

public void setQuotationUserIds(java.util.Hashtable quotationUserIds)
(Optional) Sets the quotationUserIds. This parameter is a map where the key is an Integer and the entry at any key is a quotation userid. The key is used to map the appropriate quotation userid to its matching quotation store id. The keys should not include the integer 0.
Parameters:
quotationUserIds - The map of quotationUserIds to set. This map and the other 3 maps should have the corresponding set of data for a request all at the same key value.

getQuotationPasswords

public java.util.Hashtable getQuotationPasswords()
Gets the quotationPasswords map. This parameter is a map where the key is an Integer and the entry at any key is a quotation password. The key is used to map the appropriate quotation password to its matching user id.
Returns:
The quotationPasswords map.

setQuotationPasswords

public void setQuotationPasswords(java.util.Hashtable quotationPasswords)
(Optional) Sets the quotationPasswords. This parameter is a map where the key is an Integer and the entry at any key is a quotation password. The key is used to map the appropriate quotation password to its matching store id. The keys should not include the integer 0.
Parameters:
quotationPasswords - The map of quotationPasswords to set. This map and the other 3 maps should have the corresponding set of data for a request all at the same key value.

getOutOrderQuotationRelIdName

public java.lang.String[] getOutOrderQuotationRelIdName()
Gets the outOrderQuotationRelIdName.
Returns:
The array of outOrderQuotationRelIdName.

setOutOrderQuotationRelIdName

public void setOutOrderQuotationRelIdName(java.lang.String[] outOrderQuotationRelIdName)
(Optional) Sets the outOrderQuotationRelIdName.
Parameters:
outOrderQuotationRelIdName - The array of outOrderQuotationRelIdName to set

getDeleteOrderQuotationRelIds

public java.lang.String[] getDeleteOrderQuotationRelIds()
Gets the order quotation rel ids to be deleted.
Returns:
The array of order quotation rel ids.

setDeleteOrderQuotationRelIds

public void setDeleteOrderQuotationRelIds(java.lang.String[] deleteOrderQuotationRelIds)
(Optional) Sets the order quotation rel ids to be deleted along with their child Orders, if their type is either "initial" or "final", and if their parent Orders are one of the shopcarts specified by the orderId parameter.
Parameters:
deleteOrderQuotationRelIds - The order quotation rel ids to be deleted.