com.ibm.commerce.orderquotation.commands
Class OrderQuotationCheckCmdImpl

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

public class OrderQuotationCheckCmdImpl
extends ControllerCommandImpl
implements OrderQuotationCheckCmd

Checks to see if child Orders exist for the specified OrderQuotationRel objects. Re-direct to one of three specified URLs depending on the result of the check.

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. OrderQuotationCheckCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Constructor Summary
OrderQuotationCheckCmdImpl()
           
 
Method Summary
 java.lang.String getErrorURL()
          Returns the errorURL.
 java.lang.String getOKURL()
          Gets the OK URL
 java.lang.String[] getOrderQuotationRelIds()
          Gets the orderQuotationRelIds
 java.lang.String[] getOutOkOrderQuotationIdName()
          Gets the outOkOrderQuotationIdName
 java.lang.String[] getOutTimeoutOrderQuotationIdName()
          Gets the outTimeoutOrderQuotationIdName
 java.lang.String[] getOutWaitingOrderQuotationIdName()
          Gets the outWaitingOrderQuotationIdName
  AccessVector getResources()
          Gets the vector of resources accessed by this command.
 java.lang.String getTimeoutURL()
          Gets the timeoutURL.
 java.lang.String getWaitURL()
          Gets the waitURL
 void performExecute()
          Executes the command.
 void reset()
          Resets the command.
 void setErrorURL(java.lang.String errorURL)
          Sets the errorURL.
 void setOKURL(java.lang.String okURL)
          Sets the OK URL
 void setOrderQuotationRelIds(java.lang.String[] orderQuotationRelIds)
          Sets the orderQuotationRelIds
 void setOutOkOrderQuotationIdName(java.lang.String[] outOkOrderQuotationIdName)
          Sets the outOkOrderQuotationIdName
 void setOutTimeoutOrderQuotationIdName(java.lang.String[] outTimeoutOrderQuotationIdName)
          Sets the outTimeoutOrderQuotationIdName
 void setOutWaitingOrderQuotationIdName(java.lang.String[] outWaitingOrderQuotationIdName)
          Sets the outWaitingOrderQuotationIdName
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the requestProperties for the command.
 void setTimeoutURL(java.lang.String timeoutURL)
          Sets the timeoutURL.
 void setWaitURL(java.lang.String waitURL)
          Sets the waitURL
 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

OrderQuotationCheckCmdImpl

public OrderQuotationCheckCmdImpl()
Method Detail

getOKURL

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

setOKURL

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

getWaitURL

public java.lang.String getWaitURL()
Gets the waitURL
Returns:
The waitURL.

setWaitURL

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

getTimeoutURL

public java.lang.String getTimeoutURL()
Gets the timeoutURL.
Returns:
The timeoutURL.

setTimeoutURL

public void setTimeoutURL(java.lang.String timeoutURL)
Sets the timeoutURL.
Parameters:
timeoutURL - The timeoutURL 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 okURL is not specified.
ECException

performExecute

public void performExecute()
                    throws ECException
Executes the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - 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.

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:
orderQuotationRelId (optional, default=*initial*parent. (Initial quotations for the current pending Orders.))
The OrderQuotationRel objects to be checked. Valid values: list of (OrderQuotationRelId | OrderQuotationRel abbreviation).
outOkOrderQuotationRelIdName (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 checked OrderQuotationRel objects that do have a child Order.
outTimeoutOrderQuotationRelIdName (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 checked OrderQuotationRel objects that do not yet have child Orders, but whose timeoutTime attribute values are less than the current time.
outWaitingOrderQuotationRelIdName (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 checked OrderQuotationRel objects that do not yet have child Orders, but whose timeoutTime attribute values are not less than the current time.
okURL
The redirection URL that is returned if child Orders exist for all the checked OrderQuotationRel objects.
timeoutURL (default=the value of the waitURL parameter)
The redirection URL that is returned if some of the checked OrderQuotationRel objects do not yet have child Orders, but have a timeoutTime less than the current time.
waitURL (default=the value of the okURL parameter)
The redirection URL that is returned if some of the checked OrderQuotationRel objects do not yet have child Orders, but none of them have a timeoutTime less than the current time.
Throws:
ECException - These 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.

getOutOkOrderQuotationIdName

public java.lang.String[] getOutOkOrderQuotationIdName()
Gets the outOkOrderQuotationIdName
Returns:
An array of names to contain the values of the received quotation order ids.

setOutOkOrderQuotationIdName

public void setOutOkOrderQuotationIdName(java.lang.String[] outOkOrderQuotationIdName)
Sets the outOkOrderQuotationIdName
Parameters:
outOkOrderQuotationIdName - The outOkOrderQuotationIdName to set

getOutTimeoutOrderQuotationIdName

public java.lang.String[] getOutTimeoutOrderQuotationIdName()
Gets the outTimeoutOrderQuotationIdName
Returns:
An array of names to contain the values of the timed out quotation order ids.

setOutTimeoutOrderQuotationIdName

public void setOutTimeoutOrderQuotationIdName(java.lang.String[] outTimeoutOrderQuotationIdName)
Sets the outTimeoutOrderQuotationIdName
Parameters:
outTimeoutOrderQuotationIdName - The outTimeoutOrderQuotationIdName to set

getOutWaitingOrderQuotationIdName

public java.lang.String[] getOutWaitingOrderQuotationIdName()
Gets the outWaitingOrderQuotationIdName
Returns:
An array of names to contain the values of the quotation order ids that have not timed out nor been received.

setOutWaitingOrderQuotationIdName

public void setOutWaitingOrderQuotationIdName(java.lang.String[] outWaitingOrderQuotationIdName)
Sets the outWaitingOrderQuotationIdName
Parameters:
outWaitingOrderQuotationIdName - The outWaitingOrderQuotationIdName to set

getOrderQuotationRelIds

public java.lang.String[] getOrderQuotationRelIds()
Gets the orderQuotationRelIds
Returns:
The orderQuotationRelIds.

setOrderQuotationRelIds

public void setOrderQuotationRelIds(java.lang.String[] orderQuotationRelIds)
Sets the orderQuotationRelIds
Parameters:
orderQuotationRelIds - The orderQuotationRelIds to set

getErrorURL

public java.lang.String getErrorURL()
Returns the errorURL.
Returns:
String

setErrorURL

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