com.ibm.commerce.negotiation.commands
Class GenBidRefCmdImpl
com.ibm.commerce.negotiation.commands.GenBidRefCmdImpl
- All Implemented Interfaces:
- ECCommand, GenBidRefCmd
- public class GenBidRefCmdImpl
- implements GenBidRefCmd
Generates a unique Bid Reference key.
This unique bid reference key is ocmposed of three parts separated
by a delimiter ('-'):
- First part is the user/shopper number.
- Second part is the the current milliseconds for the time
elapsed since 1/1/1970 (yymmddhhmmss).
- Third part is 6 digits long sub-key made up of the hash code for this
instance with and the current nano-seconds from the second part time stamp.
Method Summary |
java.lang.String |
getBidReferenceKey()
Returns a unique bid reference key. |
boolean |
isReadyToCallExecute()
Verifies that the this command is ready to be executed. |
void |
performExecute()
Genarates a unique bid reference number and saves locally for
future retrieval. |
void |
setBidType(java.lang.String bidType)
Sets this bid type. |
void |
setErrorTaskName(java.lang.String errorTaskName)
Set error task name that will be returned by the exceptions. |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
COPYRIGHT
public static final java.lang.String COPYRIGHT
keySeparator
public static final java.lang.String keySeparator
LAST_SUBKEY_LEN
public static final int LAST_SUBKEY_LEN
MIDDLE_SUBKEY_LEN
public static final int MIDDLE_SUBKEY_LEN
GenBidRefCmdImpl
public GenBidRefCmdImpl()
- GenBidRefImpl default constructor.
getBidReferenceKey
public java.lang.String getBidReferenceKey()
- Returns a unique bid reference key. A null key will be returned if
this method is invoked prior to generating the key.
- Specified by:
getBidReferenceKey
in interface GenBidRefCmd
- Returns:
- String - Generated bid reference key or a null value.
isReadyToCallExecute
public boolean isReadyToCallExecute()
- Verifies that the this command is ready to be executed.
- Returns:
- boolean =true if command is ready, otherwise false.
performExecute
public void performExecute()
throws ECException
- Genarates a unique bid reference number and saves locally for
future retrieval.
- Specified by:
performExecute
in interface ECCommand
- Throws:
ECException
- -
setBidType
public void setBidType(java.lang.String bidType)
- Sets this bid type.
- Specified by:
setBidType
in interface GenBidRefCmd
- Parameters:
bidType
- java.lang.String - Regular or Auto bid type.
setErrorTaskName
public void setErrorTaskName(java.lang.String errorTaskName)
- Set error task name that will be returned by the exceptions.
- Specified by:
setErrorTaskName
in interface GenBidRefCmd
- Parameters:
errorTaskName
- java.lang.String