com.ibm.commerce.negotiation.commands
Class GenBidRefCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.negotiation.commands.GenBidRefCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, GenBidRefCmd, TaskCommand

public class GenBidRefCmdImpl
extends TaskCommandImpl
implements GenBidRefCmd

Generates a unique Bid Reference key.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright statement.
static java.lang.String keySeparator
          The generated key will be formatted in three numeric sub-keys separated by hyphens - the keySeperator is the hyphen.
static int LAST_SUBKEY_LEN
          The last subkey length.
static int MIDDLE_SUBKEY_LEN
          The length of the middle subkey.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.negotiation.commands. GenBidRefCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
GenBidRefCmdImpl()
          GenBidRefImpl default constructor.
 
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 class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
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
Copyright statement.
See Also:
Constant Field Values

keySeparator

public static final java.lang.String keySeparator
The generated key will be formatted in three numeric sub-keys separated by hyphens - the keySeperator is the hyphen.
See Also:
Constant Field Values

MIDDLE_SUBKEY_LEN

public static final int MIDDLE_SUBKEY_LEN
The length of the middle subkey.
See Also:
Constant Field Values

LAST_SUBKEY_LEN

public static final int LAST_SUBKEY_LEN
The last subkey length.
See Also:
Constant Field Values
Constructor Detail

GenBidRefCmdImpl

public GenBidRefCmdImpl()
GenBidRefImpl default constructor.
Method Detail

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.
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
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
Overrides:
performExecute in class AbstractECTargetableCommand
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