Class AoservPersistenceMechanism
java.lang.Object
com.aoindustries.aoserv.creditcards.AoservPersistenceMechanism
- All Implemented Interfaces:
PersistenceMechanism
Stores the information in the AOServ Platform. The principal sent in to the
methods should be an instance of
AoservConnectorPrincipal and
any group should be a AccountGroup.
All operations will be performed using the connector from the principal, therefore the underlying AOServ security model will apply to these calls.
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionvoidauthorizeCompleted(Principal principal, Transaction transaction) Stores the results of an authorize transaction.voiddeleteCreditCard(Principal principal, CreditCard creditCard) getCreditCard(Principal principal, String persistenceUniqueId) getCreditCards(Principal principal) getCreditCards(Principal principal, String providerId) static AoservPersistenceMechanismOnly one instance is necessary since all calls are on the method parameter objects.insertTransaction(Principal principal, Group group, Transaction transaction) voidsaleCompleted(Principal principal, Transaction transaction) Stores the results of a sale transaction.storeCreditCard(Principal principal, CreditCard creditCard) voidupdateCardNumber(Principal principal, CreditCard creditCard, String cardNumber, byte expirationMonth, short expirationYear) voidupdateCreditCard(Principal principal, CreditCard creditCard) voidupdateExpiration(Principal principal, CreditCard creditCard, byte expirationMonth, short expirationYear) voidvoidCompleted(Principal principal, Transaction transaction)
-
Method Details
-
getInstance
Only one instance is necessary since all calls are on the method parameter objects. -
storeCreditCard
- Specified by:
storeCreditCardin interfacePersistenceMechanism- Throws:
SQLException
-
getCreditCard
public CreditCard getCreditCard(Principal principal, String persistenceUniqueId) throws SQLException - Specified by:
getCreditCardin interfacePersistenceMechanism- Throws:
SQLException
-
getCreditCards
- Specified by:
getCreditCardsin interfacePersistenceMechanism- Throws:
SQLException
-
getCreditCards
public Map<String,CreditCard> getCreditCards(Principal principal, String providerId) throws SQLException - Specified by:
getCreditCardsin interfacePersistenceMechanism- Throws:
SQLException
-
updateCreditCard
- Specified by:
updateCreditCardin interfacePersistenceMechanism- Throws:
SQLException
-
updateCardNumber
public void updateCardNumber(Principal principal, CreditCard creditCard, String cardNumber, byte expirationMonth, short expirationYear) throws SQLException - Specified by:
updateCardNumberin interfacePersistenceMechanism- Throws:
SQLException
-
updateExpiration
public void updateExpiration(Principal principal, CreditCard creditCard, byte expirationMonth, short expirationYear) throws SQLException - Specified by:
updateExpirationin interfacePersistenceMechanism- Throws:
SQLException
-
deleteCreditCard
- Specified by:
deleteCreditCardin interfacePersistenceMechanism- Throws:
SQLException
-
insertTransaction
public String insertTransaction(Principal principal, Group group, Transaction transaction) throws SQLException - Specified by:
insertTransactionin interfacePersistenceMechanism- Throws:
SQLException
-
saleCompleted
Stores the results of a sale transaction.- authorizationResult
- captureTime
- capturePrincipalName
- captureResult
- status
The current status must be PROCESSING or AUTHORIZED.
- Specified by:
saleCompletedin interfacePersistenceMechanism- Throws:
SQLException
-
authorizeCompleted
Stores the results of an authorize transaction.- authorizationResult
- status
The current status must be PROCESSING.
- Specified by:
authorizeCompletedin interfacePersistenceMechanism- Throws:
SQLException
-
voidCompleted
- Specified by:
voidCompletedin interfacePersistenceMechanism- Throws:
SQLException
-
