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

java.lang.Object
  extended by com.ecebs.rtd.enabler.types.request.ModifyRequest
      extended by com.ecebs.rtd.enabler.types.request.LoadProductRequest
All Implemented Interfaces:
Request, Serializable

public class LoadProductRequest
extends ModifyRequest

Represents a request to be sent to an RTD server to load a product on to a CM

Author:
kyleb
See Also:
Serialized Form

Constructor Summary
LoadProductRequest()
          Create a request with no intialised parameters.
LoadProductRequest(String cardId, CardType cardType, String productName)
          Sets all the required parameters with the provided values.
 
Method Summary
 LoadProductRequest addParam(String key, Object value)
          Add a parameter to the request.
 LoadProductRequest setCardId(String cardId)
          Set the ID of the card to load the product on to
 LoadProductRequest setCardType(CardType cardType)
          Set the type of the card to load the product on to
 LoadProductRequest setProductName(String productName)
          Set the name of the product to load
 Outcome validate()
          Validate that the required fields have been set
 
Methods inherited from class com.ecebs.rtd.enabler.types.request.ModifyRequest
getCardId, getCardType, getRequestId, setRequestId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadProductRequest

public LoadProductRequest()
Create a request with no intialised parameters. All of the required parameters must be set before using this request for an operation. Methods for setting required parameters start with "set"

See Also:
setCardId(String), setCardType(CardType), setProductName(String)

LoadProductRequest

public LoadProductRequest(String cardId,
                          CardType cardType,
                          String productName)
Sets all the required parameters with the provided values.

Parameters:
cardId - ID of the card that the product should be loaded onto
cardType - The type of the card
productName - The name of the product
Method Detail

setCardId

public LoadProductRequest setCardId(String cardId)
Set the ID of the card to load the product on to

Parameters:
cardId - ID of the card to load the product on to
Returns:
This instance to allow for method chaining

setCardType

public LoadProductRequest setCardType(CardType cardType)
Set the type of the card to load the product on to

Parameters:
cardType - Type of the card to load the product on to
Returns:
This instance to allow for method chaining

setProductName

public LoadProductRequest setProductName(String productName)
Set the name of the product to load

Parameters:
productName - Name of the product to load
Returns:
This instance to allow for method chaining

addParam

public LoadProductRequest addParam(String key,
                                   Object value)
Description copied from class: ModifyRequest
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()

Specified by:
addParam in class ModifyRequest
Parameters:
key - The key for the parameter
value - The value of the parameter
Returns:
This instance to allow for method chaining

validate

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

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


Copyright © 2013 Ecebs Ltd. All Rights Reserved.