com.ibm.commerce.negotiation.commands
Class ProcessRunner

java.lang.Object
  |
  +--com.ibm.commerce.negotiation.commands.ProcessRunner
All Implemented Interfaces:
java.lang.Runnable

public class ProcessRunner
extends java.lang.Object
implements java.lang.Runnable

Process Runner class.


Constructor Summary
ProcessRunner()
           
 
Method Summary
protected  void beginTransaction()
          Begins a new transaction scope.
protected  void commitTransaction()
          Commits the current transaction scope.
 boolean completed()
          Returns this process completion status.
protected  CommandContext getCommandContext()
          Get the store Id
protected  java.lang.Object getDataHandle()
          Get the handle for the data to be processed.
protected  java.lang.String getErrorTaskName()
          Returns this process's error task name.
 java.lang.Object getException()
          Returns the exception generated by this process.
protected  void rollbackTransaction()
          Rolls back the current transaction changes.
 void run()
          Create and execute the specified task command to process the Auctions/Bids
 void setCommandContext(CommandContext context)
          Set the context for the command to be executed when this process runs.
 void setCommandName(java.lang.String commandName)
          Set the fully qualified name of the command to be executed.
 void setDataHandle(java.lang.Object handle)
          Set the handle for the data.
 void setErrorTaskName(java.lang.String errorTaskName)
          Sets this process's error task name
protected  void setException(java.lang.Object exception)
          Saves the exception generated by this process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessRunner

public ProcessRunner()
Method Detail

beginTransaction

protected void beginTransaction()
                         throws ECSystemException
Begins a new transaction scope.

commitTransaction

protected void commitTransaction()
                          throws javax.transaction.RollbackException,
                                 ECSystemException
Commits the current transaction scope.

completed

public boolean completed()
Returns this process completion status.
Returns:
boolean - true if the process execution completed successfully, otherwise false.

getCommandContext

protected CommandContext getCommandContext()
Get the store Id
Returns:
Integer - Store Id

getDataHandle

protected java.lang.Object getDataHandle()
Get the handle for the data to be processed.
Returns:
Object - Data handle.

getErrorTaskName

protected java.lang.String getErrorTaskName()
Returns this process's error task name.
Returns:
tring - Error task name

getException

public java.lang.Object getException()
Returns the exception generated by this process.
Returns:
Object - Exception instance, or null if no exceptions.

rollbackTransaction

protected void rollbackTransaction()
Rolls back the current transaction changes.

run

public void run()
Create and execute the specified task command to process the Auctions/Bids
Specified by:
run in interface java.lang.Runnable

setCommandContext

public void setCommandContext(CommandContext context)
Set the context for the command to be executed when this process runs.
Parameters:
context - CommandContext - Command context

setCommandName

public void setCommandName(java.lang.String commandName)
Set the fully qualified name of the command to be executed.
Parameters:
commandName - String - Fully qualified command name.

setDataHandle

public void setDataHandle(java.lang.Object handle)
Set the handle for the data. The handle type varies based on the requirement of the user of this class.
Parameters:
data - Object - A handle to the data to be processed.

setErrorTaskName

public void setErrorTaskName(java.lang.String errorTaskName)
Sets this process's error task name
Parameters:
errorTaskName - java.lang.String

setException

protected void setException(java.lang.Object exception)
Saves the exception generated by this process.
Parameters:
exception - Object