|
CreditCardPack | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Remote interface of CreditCardEJB.
| Method Summary | |
String[] |
getBillingAddress()
Gets the card billing address. |
String |
getCardName()
Gets the card owners name. |
String |
getCardNumber()
Gets the credit card number. |
CardType |
getCardType()
Gets the card type. |
String |
getCardVerificationNumber()
Gets the Card Verification Number, this is not be stored in long term persistence. |
String |
getComments()
Gets the card comments |
Integer |
getExpiryMonth()
Gets the card expiry date month. |
Integer |
getExpiryYear()
Gets the card expiry date year. |
Integer |
getIssueNumber()
Gets the card issue number. |
String |
getIssuer()
Gets the card issuer. |
Integer |
getStartMonth()
Gets the card start date month. |
Integer |
getStartYear()
Gets the card start date year. |
boolean |
isCardNameValid()
Determines if the card holders name is valid, this is a very simple method, that just checks if the card name field is longer than 0 chars. |
boolean |
isCardNumberValid()
Determines if the card number is valid, according to a MOD10 check and character validity check. |
boolean |
isCardTypeValid()
Determines if the card type corresponds with the credit card number. |
boolean |
isCardVerificationNumberValid()
Determines if the card verification number is 3 or 4 digits long and only includes numeric characters. |
boolean |
isExpiryMonthValid()
Determines if the expiry month is valid, simply by checking that it is between 1 and 12 inclusive. |
boolean |
isExpiryYearValid()
Determines if the expiry year is valid , simply by checking that it is between 0 and 99 inclusive (since credit card expiry dates are 2 digits long). |
boolean |
isMinimumValid()
Convenience method, checks that card number, expiry date, type and card name are valid. |
boolean |
isStartMonthValid()
Determines if the start month is valid, simply by checking that it is between 1 and 12 inclusive. |
boolean |
isStartYearValid()
Determines if the start year is valid , simply by checking that it is between 0 and 99 inclusive (since credit card start dates are 2 digits long). |
void |
setBillingAddress(String[] billingAddress)
Sets the card billingAddress array. |
void |
setCardName(String cardName)
Sets the card owners name. |
void |
setCardType(CardType cardType)
Sets the card type. |
void |
setCardVerificationNumber(String cvn)
Sets the Card Verification Number (CVN), this is NOT stored in long term persistence. |
void |
setComments(String comments)
Sets the card comments. |
void |
setExpiryMonth(int expiryMonth)
Sets the card expiry date month, using setExpiryMonth(Integer). |
void |
setExpiryMonth(Integer expiryMonth)
Sets the card expiry date month. |
void |
setExpiryYear(int expiryYear)
Sets the card expiry date year, using setExpiryYear(Integer). |
void |
setExpiryYear(Integer expiryYear)
Sets the card expiry date year, because credit cards usually specify 2 digit year values this is mirrored here. |
void |
setIssueNumber(int issueNumber)
Sets the card issue number, using setIssueNumber(Integer). |
void |
setIssueNumber(Integer issueNumber)
Sets the card issue number. |
void |
setIssuer(String issuer)
Sets the card issuer's name. |
void |
setStartMonth(int startMonth)
Sets the card start date month, using setStartMonth(Integer). |
void |
setStartMonth(Integer startMonth)
Sets the card start date month. |
void |
setStartYear(int startYear)
Sets the card start date year, using setStartYear(Integer). |
void |
setStartYear(Integer startYear)
Sets the card start date year, because credit cards usually specify 2 digit year values this is mirrored here. |
| Methods inherited from interface javax.ejb.EJBObject |
getEJBHome,
getHandle,
getPrimaryKey,
isIdentical,
remove |
| Method Detail |
public String getCardNumber()
throws RemoteException
public boolean isCardNumberValid()
throws RemoteException
return == LuhnChecker.isValid(getCardNumber())
public String getCardName()
throws RemoteException
public void setCardName(String cardName)
throws RemoteException
cardName != nullgetCardName() == cardName
public boolean isCardNameValid()
throws RemoteException
public Integer getExpiryMonth()
throws RemoteException
public void setExpiryMonth(Integer expiryMonth)
throws RemoteException
expiryMonth != null AND expiryMonth >= 1 AND expiryMonth <= 12getExpiryMonth() == expiryMonth AND isExpiryMonthValid() == true
public Integer getExpiryYear()
throws RemoteException
public void setExpiryYear(Integer expiryYear)
throws RemoteException
expiryYear != null AND expiryYear >= 0 AND expiryYear <= 99getExpiryYear() == expiryYear AND isExpiryYearValid() == true
public void setExpiryMonth(int expiryMonth)
throws RemoteException
setExpiryMonth(Integer)
public void setExpiryYear(int expiryYear)
throws RemoteException
setExpiryYear(Integer)
public boolean isExpiryMonthValid()
throws RemoteException
public boolean isExpiryYearValid()
throws RemoteException
public Integer getStartMonth()
throws RemoteException
public void setStartMonth(Integer startMonth)
throws RemoteException
startMonth != null AND startMonth >= 1 AND startMonth <= 12getStartMonth() == startMonth AND isStartMonthValid() == true
public Integer getStartYear()
throws RemoteException
public void setStartYear(Integer startYear)
throws RemoteException
startYear != null AND startYear >= 0 AND startYear <= 99getStartYear() == startYear AND isStartYearValid() == true
public void setStartMonth(int startMonth)
throws RemoteException
setStartMonth(Integer)
public void setStartYear(int startYear)
throws RemoteException
setStartYear(Integer)
public boolean isStartMonthValid()
throws RemoteException
public boolean isStartYearValid()
throws RemoteException
public Integer getIssueNumber()
throws RemoteException
public void setIssueNumber(Integer issueNumber)
throws RemoteException
issueNumber != null AND issueNumber >=0 AND issueNumber <= 999getIssueNumber() == issueNumber
public void setIssueNumber(int issueNumber)
throws RemoteException
setIssueNumber(Integer)
public CardType getCardType()
throws RemoteException
public void setCardType(CardType cardType)
throws RemoteException
cardType != nullgetCardType() == cardType
public boolean isCardTypeValid()
throws RemoteException
CardType
public String getComments()
throws RemoteException
public String getIssuer()
throws RemoteException
public String[] getBillingAddress()
throws RemoteException
public String getCardVerificationNumber()
throws RemoteException
public void setCardVerificationNumber(String cvn)
throws RemoteException
cvn - the card verification number String.cvn != null AND ((3 <= cvn.length() <= 4 AND cvn.equals(LuhnChecker.getDigitsOnly(cvn))) OR cvn == "" )getCardVerificationNumber() == cvn
public boolean isCardVerificationNumberValid()
throws RemoteException
return == (true AND getCardVerificationNumber() != null AND 3 <= getCardVerificationNumber().length() <= 4 AND LuhnChecker.getDigitsOnly(getCardVerificationNumber()).equals(getCardVerificationNumber())) OR false
public void setIssuer(String issuer)
throws RemoteException
issuer != nullgetIssuer() == issuer
public void setComments(String comments)
throws RemoteException
comments != nullgetComments() == comments
public void setBillingAddress(String[] billingAddress)
throws RemoteException
billingAddress != nullgetBillingAddress() == billingAddress
public boolean isMinimumValid()
throws RemoteException
|
CreditCardPack | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||