com.ecebs.rtd.enabler.types.request
Class ModifyRequest

java.lang.Object
  extended by com.ecebs.rtd.enabler.types.request.ModifyRequest
All Implemented Interfaces:
Request, Serializable
Direct Known Subclasses:
AddStoredUseRequest, AddSTRRequest, DeductStoredUseRequest, DeductSTRRequest, DeleteProductRequest, LoadProductRequest, SpecificProductRequest, UpdatePassExpiryDateRequest

public abstract class ModifyRequest
extends Object
implements Request

Represents a request to carry out an operation that will modify the contents of a CM.

Author:
kyleb
See Also:
Serialized Form

Method Summary
abstract  ModifyRequest addParam(String key, Object value)
          Add a parameter to the request.
 String getCardId()
          Get the ID of the card that this request relates to
 CardType getCardType()
          Get the type of card that this request relates to
 String getRequestId()
          Get the request ID assigned to this request
 void setRequestId(String requestId)
          Sets the request ID for the request.
 Outcome validate()
          Validate that the required fields have been set
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addParam

public abstract ModifyRequest addParam(String key,
                                       Object value)
Add a parameter to the request. These are optional fields and the required fields will be specific to each application. The provided value will be converted by calling Object.toString()

Parameters:
key - The key for the parameter
value - The value of the parameter
Returns:
This instance to allow for method chaining

setRequestId

public void setRequestId(String requestId)
Sets the request ID for the request. This will be overwritten by the ITransactionController instance when sending the request and is only intended for that purpose. Any value set by an application will be discarded.

Parameters:
requestId - Request ID to be assigned to this request

getRequestId

public String getRequestId()
Get the request ID assigned to this request

Returns:
Assigned request ID, or null if one has not yet been assigned

getCardType

public CardType getCardType()
Get the type of card that this request relates to

Returns:
The type of the card

getCardId

public String getCardId()
Get the ID of the card that this request relates to

Returns:
The ID of the card

validate

public Outcome validate()
Description copied from interface: Request
Validate that the required fields have been set

Specified by:
validate in interface Request
Returns:
An outcome if the validation failed, else null


Copyright © 2013 Ecebs Ltd. All Rights Reserved.