com.ibm.etill.framework.cassette
Class BatchRequest

java.lang.Object
  |
  +--com.ibm.etill.framework.cassette.CassetteRequest
        |
        +--com.ibm.etill.framework.cassette.APIRequest
              |
              +--com.ibm.etill.framework.cassette.BatchRequest
All Implemented Interfaces:
FrameworkReturnCodes, PaymentAPIConstants, Serializable
Direct Known Subclasses:
BatchCloseRequest, BatchOpenRequest, BatchPurgeRequest, DeleteBatchRequest

public class BatchRequest
extends APIRequest

BatchRequest extends APIRequest and provides a base class for all API requests which operate on Batches. The following batch-related data members are added to the hierarchy through this class, along with the required accessor methods:

When BatchRequest objects are sent to a cassette for processing, the Framework will obtain the following locks while the request is being processed. This ensures thread safety and data integrity acrosss this request and all other operations being simultaneously performed within Commerce Payments:
ObjectLock TypeEffect
Batch Write Prevents any other activity for the batch
AccountAdmin Read or Write A Read lock prevents a BATCHCLOSE operation from beginning. This lock is obtained for all batch requests other than BatchOpen, BatchClose, DeleteBatch and BatchPurge.

A Write lock prevents any other activity on the Account while this request is being processed. This type of lock is obtained for BatchOpen, BatchClose and BatchPurge requests.

Note: The Cassette must ensure that the Batch is in the closed state when handling a DeleteBatch operation. When the Batch is in the closed state, the write lock does not need to be obtained.

MerchantAdmin Read Prevents any significant configuration changes to the merchant
Cassette Read Prevents any significant configuration changes to the cassette
PayServer Read Prevents any significant configuration changes to Commerce Payments

See Also:
APIResponse, Batch, Serialized Form

 
Method Summary
 String getAccountNumber()
          Returns the account number of the account associated with the subject Batch.
 Batch getBatch()
          Returns the Batch object at which this request is directed.
 String getBatchNumber()
          Returns the batch number of the Batch at which this request is directed.
 
Methods inherited from class com.ibm.etill.framework.cassette.APIRequest
getFrameworkKeywords, getProtocolData
 
Methods inherited from class com.ibm.etill.framework.cassette.CassetteRequest
getConnection, getToken, obtainLocks, releaseLocks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBatch

public final Batch getBatch()
Returns the Batch object at which this request is directed.
Returns:
Batch - the generic Batch object at which the API request is directed.

getBatchNumber

public final String getBatchNumber()
Returns the batch number of the Batch at which this request is directed.
Returns:
String - the batch number of the subject Batch object.

getAccountNumber

public final String getAccountNumber()
Returns the account number of the account associated with the subject Batch.
Returns:
String - the account number of the account through which the subject Batch will be processed.