com.ibm.commerce.order.utils
Class ResolveOrdersCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.order.utils.ResolveOrdersCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, ResolveOrdersCmd, TaskCommand

public class ResolveOrdersCmdImpl
extends TaskCommandImpl
implements ResolveOrdersCmd

This is the default implementation of the ResolveOrdersCmd task command.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          The IBM copyright string
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.order.utils. ResolveOrdersCmd
ALL_ORDER_TEMPLATES, ALL_PENDING_ORDERS, CURRENT_NEW_CURRENT, CURRENT_ORDER_TEMPLATES, CURRENT_PENDING_ORDERS, defaultCommandClassName, EC_TOKEN_CHILD, EC_TOKEN_PARENT, NAME, NEW_PENDING_ORDER, NO_ORDER, PROFILE
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
ResolveOrdersCmdImpl()
          Default constructor for ResolveOrdersCmdImpl
 
Method Summary
protected  java.lang.String getInternalOrderAbbreviation(java.lang.String orderAbbreviation)
          Gets the internal order abbreviation
 java.lang.Long[] getOrderIds()
          Gets the order ids
  OrderAccessBean[] getOrders()
          Gets the orders
 int getParsingPosition()
          Gets the parsing position
 java.util.Set getUnprocessedAbbreviations()
          Gets the unprocessed abbreviations
 boolean isNewPendingOrder()
          equivalent to (getUnprocessedAbbreviations() != null && getUnprocessedAbbreviations().contains(ResolveOrdersCmd.NEW_PENDING_ORDER))
 boolean isSetToCurrent()
          equivalent to (getUnprocessedAbbreviations() != null && getUnprocessedAbbreviations().contains(ResolveOrdersCmd.CURRENT_NEW_CURRENT))
 void performExecute()
          The business logic for this command.
 void setAllowedAbbreviations(java.util.Set asetAllowedAbbreviations)
          Sets the allowed abbreviations
 void setDisallowedAbbreviations(java.util.Set asetDisallowedAbbreviations)
          Sets the abbreviations that are not allowed
 void setForeignOrdersAllowed(boolean abForeignOrdersAllowed)
          Sets if foreign orders are allowed
 void setIncompleteParsingAllowed(boolean abIncompleteParsingAllowed)
          Sets if incomplete parsing is allowed
 void setInitialParsingPosition(int anInitialParsingPosition)
          Sets the initial paring position
 void setMemberId(java.lang.Long memberId)
          Sets the member ID
 void setOrderAbbreviations(java.lang.String[] orderAbbreviations)
          Sets the order abbreviations
 void setStoreId(java.lang.Integer storeId)
          Sets the store ID
 void setStrict(boolean strict)
          equivalent to setForeignOrdersAllowed(!strict)
 void validateParameters()
          Performs parameter checking.
 
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 IBM copyright string
See Also:
Constant Field Values
Constructor Detail

ResolveOrdersCmdImpl

public ResolveOrdersCmdImpl()
Default constructor for ResolveOrdersCmdImpl
Method Detail

getInternalOrderAbbreviation

protected java.lang.String getInternalOrderAbbreviation(java.lang.String orderAbbreviation)
Gets the internal order abbreviation
Parameters:
orderAbbreviation -
Returns:
the internal order abbreviation

getOrderIds

public java.lang.Long[] getOrderIds()
Description copied from interface: ResolveOrdersCmd
Gets the order ids
Specified by:
getOrderIds in interface ResolveOrdersCmd
Returns:
An array of the order ids.
See Also:
ResolveOrdersCmd.getOrderIds()

getOrders

public OrderAccessBean[] getOrders()
Description copied from interface: ResolveOrdersCmd
Gets the orders
Specified by:
getOrders in interface ResolveOrdersCmd
Returns:
An array of the Orders
See Also:
ResolveOrdersCmd.getOrders()

isNewPendingOrder

public boolean isNewPendingOrder()
Description copied from interface: ResolveOrdersCmd
equivalent to (getUnprocessedAbbreviations() != null && getUnprocessedAbbreviations().contains(ResolveOrdersCmd.NEW_PENDING_ORDER))
Specified by:
isNewPendingOrder in interface ResolveOrdersCmd
Returns:
true if order is new pending, false otherwise
See Also:
ResolveOrdersCmd.isNewPendingOrder()

isSetToCurrent

public boolean isSetToCurrent()
Description copied from interface: ResolveOrdersCmd
equivalent to (getUnprocessedAbbreviations() != null && getUnprocessedAbbreviations().contains(ResolveOrdersCmd.CURRENT_NEW_CURRENT))
Specified by:
isSetToCurrent in interface ResolveOrdersCmd
Returns:
true if current, false otherwiser
See Also:
ResolveOrdersCmd.isSetToCurrent()

performExecute

public void performExecute()
                    throws ECException
Description copied from class: AbstractECTargetableCommand
The business logic for this command. This method should be overwritten by all command writers. Command writers should call super.performExecute() as the first line in their method.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException
See Also:
com.ibm.websphere.command.TargetableCommand#performExecute()

setMemberId

public void setMemberId(java.lang.Long memberId)
Description copied from interface: ResolveOrdersCmd
Sets the member ID
Specified by:
setMemberId in interface ResolveOrdersCmd
Parameters:
memberId - the member ID for this order
See Also:
ResolveOrdersCmd.setMemberId(Long)

setOrderAbbreviations

public void setOrderAbbreviations(java.lang.String[] orderAbbreviations)
Description copied from interface: ResolveOrdersCmd
Sets the order abbreviations
Specified by:
setOrderAbbreviations in interface ResolveOrdersCmd
Parameters:
orderAbbreviations - an array of order abbreviations
See Also:
ResolveOrdersCmd.setOrderAbbreviations(String[])

setStoreId

public void setStoreId(java.lang.Integer storeId)
Description copied from interface: ResolveOrdersCmd
Sets the store ID
Specified by:
setStoreId in interface ResolveOrdersCmd
Parameters:
storeId - the store ID
See Also:
ResolveOrdersCmd.setStoreId(Integer)

setStrict

public void setStrict(boolean strict)
Description copied from interface: ResolveOrdersCmd
equivalent to setForeignOrdersAllowed(!strict)
Specified by:
setStrict in interface ResolveOrdersCmd
Parameters:
strict - sets the strict value
See Also:
ResolveOrdersCmd.setStrict(boolean)

validateParameters

public void validateParameters()
                        throws ECException
Description copied from class: AbstractECTargetableCommand
Performs parameter checking. This method replaces checkParameters() in 5.1. The default implementation of validateParameters() is a no op. It is the responsibility of the command writers to implements this method if they want to perform server side parameter checking.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException
See Also:
ECCommand.validateParameters()

setForeignOrdersAllowed

public void setForeignOrdersAllowed(boolean abForeignOrdersAllowed)
Description copied from interface: ResolveOrdersCmd
Sets if foreign orders are allowed
Specified by:
setForeignOrdersAllowed in interface ResolveOrdersCmd
Parameters:
abForeignOrdersAllowed - sets whether or not foreign orders are allowed
See Also:
ResolveOrdersCmd.setForeignOrdersAllowed(boolean)

setAllowedAbbreviations

public void setAllowedAbbreviations(java.util.Set asetAllowedAbbreviations)
Description copied from interface: ResolveOrdersCmd
Sets the allowed abbreviations
Specified by:
setAllowedAbbreviations in interface ResolveOrdersCmd
Parameters:
asetAllowedAbbreviations - lists the allowed abbreviations
See Also:
ResolveOrdersCmd.setAllowedAbbreviations(Set)

setDisallowedAbbreviations

public void setDisallowedAbbreviations(java.util.Set asetDisallowedAbbreviations)
Description copied from interface: ResolveOrdersCmd
Sets the abbreviations that are not allowed
Specified by:
setDisallowedAbbreviations in interface ResolveOrdersCmd
Parameters:
asetDisallowedAbbreviations - lists the disallowed abbreviations
See Also:
ResolveOrdersCmd.setDisallowedAbbreviations(Set)

getUnprocessedAbbreviations

public java.util.Set getUnprocessedAbbreviations()
Description copied from interface: ResolveOrdersCmd
Gets the unprocessed abbreviations
Specified by:
getUnprocessedAbbreviations in interface ResolveOrdersCmd
Returns:
The unprocessed abbreviations
See Also:
ResolveOrdersCmd.getUnprocessedAbbreviations()

setIncompleteParsingAllowed

public void setIncompleteParsingAllowed(boolean abIncompleteParsingAllowed)
Description copied from interface: ResolveOrdersCmd
Sets if incomplete parsing is allowed
Specified by:
setIncompleteParsingAllowed in interface ResolveOrdersCmd
Parameters:
abIncompleteParsingAllowed - determines if incomplete parsing is allowed
See Also:
ResolveOrdersCmd.setIncompleteParsingAllowed(boolean)

setInitialParsingPosition

public void setInitialParsingPosition(int anInitialParsingPosition)
Description copied from interface: ResolveOrdersCmd
Sets the initial paring position
Specified by:
setInitialParsingPosition in interface ResolveOrdersCmd
Parameters:
anInitialParsingPosition - sets the initial parsing position
See Also:
ResolveOrdersCmd.setInitialParsingPosition(int)

getParsingPosition

public int getParsingPosition()
Description copied from interface: ResolveOrdersCmd
Gets the parsing position
Specified by:
getParsingPosition in interface ResolveOrdersCmd
Returns:
The parsing position
See Also:
ResolveOrdersCmd.getParsingPosition()