com.ibm.commerce.negotiation.commands
Class ProcessControllerCmdImpl
java.lang.Object
|
+--CacheableCommandImpl
|
+--com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.negotiation.commands.ProcessControllerCmdImpl
- All Implemented Interfaces:
-
AccCommand,
ControllerCommand,
ECCommand,
ECTargetableCommand,
ProcessControllerCmd
- Direct Known Subclasses:
-
ProcessAutoBidsCmdImpl,
ProcessDutchBidsCmdImpl,
ProcessOpenCryBidsCmdImpl
- public abstract class ProcessControllerCmdImpl
- extends
ControllerCommandImpl
- implements
ProcessControllerCmd
Process controller command. Implements common behavior for the bids
processing commands. This command uses the following AccessBeans:
AuctionJDBCHelperAccessBean
- See Also:
- Serialized
Form
Field Summary |
static java.lang.String |
COPYRIGHT
Copyright statement. |
Method Summary |
protected
boolean |
dispatchJob(java.lang.Runnable runner, java.lang.String threadPoolType,
java.lang.Long auctionId)
Dispatch a job using a thread from the specified scheduler thread
pool |
java.util.Hashtable |
getAllExceptions()
Get a list of all the exceptions generated by this process. |
protected
java.lang.String |
getErrorTaskName()
Returns this command's error task name. |
protected
void |
handleException(java.lang.Exception e)
Formats and saves an ECException based on the input exception
value. |
boolean |
isReadyToCallExecute()
Verifies that the this command is ready to be executed. |
void |
reset()
Reset current command to its initial state to allow for
reuse. |
protected
java.util.Vector |
retrieveActiveAuctions(java.lang.String type,
SortingAttribute sortBy)
Retrieve all active auctions for the specified type and sort them by
the specified sorting attribute. |
void |
setErrorTaskName(java.lang.String errorTaskName)
Sets this command's error task name |
void |
setRequestProperties(
TypedProperty requestParam)
Saves the optional command parameter values. |
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,
getResources,
getStoreId,
getUser,
getUserId,
performExecute,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
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.
ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
performExecute,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- Copyright statement.
- See Also:
-
Constant Field Values
ProcessControllerCmdImpl
public ProcessControllerCmdImpl()
- Default constructor.
dispatchJob
protected boolean dispatchJob(java.lang.Runnable runner,
java.lang.String threadPoolType,
java.lang.Long auctionId)
throws java.lang.Exception
- Dispatch a job using a thread from the specified scheduler thread pool
-
- Parameters:
runner
- java.lang.Runnable
threadPoolType
- String
auctionId
- Long
- Returns:
- true if the job is dispatched successfully, false otherwise.
- Throws:
-
ECApplicationException
- - Exception starting a new thread or the
scheduler has not started.
java.lang.Exception
getAllExceptions
public java.util.Hashtable getAllExceptions()
- Get a list of all the exceptions generated by this process.
-
- Specified by:
-
getAllExceptions
in interface
ProcessControllerCmd
-
- Returns:
- Hashtable - Exceptions table, or null if no exceptions.
getErrorTaskName
protected java.lang.String getErrorTaskName()
- Returns this command's error task name.
-
- Returns:
- tring - Error task name
handleException
protected void handleException(java.lang.Exception e)
- Formats and saves an ECException based on the input exception value.
-
- Parameters:
e
- Exception - The exception instance to be
formatted.
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.
reset
public void reset()
- Reset current command to its initial state to allow for reuse.
-
- Overrides:
-
reset
in class
AbstractECTargetableCommand
retrieveActiveAuctions
protected java.util.Vector retrieveActiveAuctions(java.lang.String type,
SortingAttribute sortBy)
throws java.lang.Exception
- Retrieve all active auctions for the specified type and sort them by the
specified sorting attribute. An active auction is Current, has Active bids and
a book keeping time earlier than one of the active bid.
-
- Parameters:
type
- String - Auction type.
sortBy
- Sorting Attribute(s) - Auction list sorting
criteria.
- Returns:
- Vector - A list of currently active auctions of the specified type.
- Throws:
java.lang.Exception
- - Exception on retrieving
auctions.
setErrorTaskName
public void setErrorTaskName(java.lang.String errorTaskName)
- Sets this command's error task name
-
- Specified by:
-
setErrorTaskName
in interface
ProcessControllerCmd
-
- Parameters:
errorTaskName
- java.lang.String
setRequestProperties
public void setRequestProperties(TypedProperty requestParam)
throws ECException
- Saves the optional command parameter values.
-
- Specified by:
-
setRequestProperties
in interface
ControllerCommand
- Overrides:
-
setRequestProperties
in class
ControllerCommandImpl
-
- Parameters:
requestParam
- request properties
- Throws:
ECApplicationException:
- An exception is returned if any of
the mandatory parameters are missing, or invalid
-
ECException