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

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

public class UpdatePassExpiryDateRequest
extends ModifyRequest

Represents a request to update the expiry of the current pass of an ITSO TYP22 product on a CM

Author:
kyleb
See Also:
Serialized Form

Nested Class Summary
static class UpdatePassExpiryDateRequest.UpdatePassExpiryDateReason
           
 
Constructor Summary
UpdatePassExpiryDateRequest()
          Create a request with no initialised parameters.
UpdatePassExpiryDateRequest(String cardId, CardType cardType, String identifier, String productName, Calendar passExpiry)
          Sets all the required parameters with the provided values.
 
Method Summary
 UpdatePassExpiryDateRequest addParam(String key, Object value)
          Add a parameter to the request.
 UpdatePassExpiryDateRequest setCardId(String cardId)
          Set the ID of the card to modify
 UpdatePassExpiryDateRequest setCardType(CardType cardType)
          Set the type of the card to modify
 UpdatePassExpiryDateRequest setIdentifierId(String identifier)
          Set the details of the ISAM that created the product
 UpdatePassExpiryDateRequest setPassExpiryDate(Calendar passExpiry)
          Set the new expiry date of the current pass
 UpdatePassExpiryDateRequest setProductName(String productName)
          Set the name of the product to modify
 UpdatePassExpiryDateRequest setReason(UpdatePassExpiryDateRequest.UpdatePassExpiryDateReason reason)
          Set the reason for the update taking place
 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

UpdatePassExpiryDateRequest

public UpdatePassExpiryDateRequest()
Create a request with no initialised 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), setIdentifierId(String), setProductName(String), #setPassExpiry(Calendar)

UpdatePassExpiryDateRequest

public UpdatePassExpiryDateRequest(String cardId,
                                   CardType cardType,
                                   String identifier,
                                   String productName,
                                   Calendar passExpiry)
Sets all the required parameters with the provided values.

Parameters:
cardId - ID of the card with the product for which the pass expiry should be updated
cardType - The type of the card
identifier - The identifier of the ISAM that created the product
productName - The name of the product
passExpiry - The new expiry date for the period pass
Method Detail

setCardId

public UpdatePassExpiryDateRequest setCardId(String cardId)
Set the ID of the card to modify

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

setCardType

public UpdatePassExpiryDateRequest setCardType(CardType cardType)
Set the type of the card to modify

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

setReason

public UpdatePassExpiryDateRequest setReason(UpdatePassExpiryDateRequest.UpdatePassExpiryDateReason reason)
Set the reason for the update taking place

Parameters:
reason - Reason for the update taking place
Returns:
This instance to allow for method chaining

setProductName

public UpdatePassExpiryDateRequest setProductName(String productName)
Set the name of the product to modify

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

addParam

public UpdatePassExpiryDateRequest 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.

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

setIdentifierId

public UpdatePassExpiryDateRequest setIdentifierId(String identifier)
Set the details of the ISAM that created the product

Parameters:
identifier - The identifier of the ISAM that created the product to be updated.
Returns:
This instance to allow for method chaining

setPassExpiryDate

public UpdatePassExpiryDateRequest setPassExpiryDate(Calendar passExpiry)
Set the new expiry date of the current pass

Parameters:
passExpiry - The new expiry date of the pass
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.