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 TypeMethodDescriptionvoid
authorizeCompleted
(Principal principal, Transaction transaction) Stores the results of an authorize transaction.void
deleteCreditCard
(Principal principal, CreditCard creditCard) getCreditCard
(Principal principal, String persistenceUniqueId) getCreditCards
(Principal principal) getCreditCards
(Principal principal, String providerId) static AoservPersistenceMechanism
Only one instance is necessary since all calls are on the method parameter objects.insertTransaction
(Principal principal, Group group, Transaction transaction) void
saleCompleted
(Principal principal, Transaction transaction) Stores the results of a sale transaction.storeCreditCard
(Principal principal, CreditCard creditCard) void
updateCardNumber
(Principal principal, CreditCard creditCard, String cardNumber, byte expirationMonth, short expirationYear) void
updateCreditCard
(Principal principal, CreditCard creditCard) void
updateExpiration
(Principal principal, CreditCard creditCard, byte expirationMonth, short expirationYear) void
voidCompleted
(Principal principal, Transaction transaction)
-
Method Details
-
getInstance
Only one instance is necessary since all calls are on the method parameter objects. -
storeCreditCard
- Specified by:
storeCreditCard
in interfacePersistenceMechanism
- Throws:
SQLException
-
getCreditCard
public CreditCard getCreditCard(Principal principal, String persistenceUniqueId) throws SQLException - Specified by:
getCreditCard
in interfacePersistenceMechanism
- Throws:
SQLException
-
getCreditCards
- Specified by:
getCreditCards
in interfacePersistenceMechanism
- Throws:
SQLException
-
getCreditCards
public Map<String,CreditCard> getCreditCards(Principal principal, String providerId) throws SQLException - Specified by:
getCreditCards
in interfacePersistenceMechanism
- Throws:
SQLException
-
updateCreditCard
- Specified by:
updateCreditCard
in interfacePersistenceMechanism
- Throws:
SQLException
-
updateCardNumber
public void updateCardNumber(Principal principal, CreditCard creditCard, String cardNumber, byte expirationMonth, short expirationYear) throws SQLException - Specified by:
updateCardNumber
in interfacePersistenceMechanism
- Throws:
SQLException
-
updateExpiration
public void updateExpiration(Principal principal, CreditCard creditCard, byte expirationMonth, short expirationYear) throws SQLException - Specified by:
updateExpiration
in interfacePersistenceMechanism
- Throws:
SQLException
-
deleteCreditCard
- Specified by:
deleteCreditCard
in interfacePersistenceMechanism
- Throws:
SQLException
-
insertTransaction
public String insertTransaction(Principal principal, Group group, Transaction transaction) throws SQLException - Specified by:
insertTransaction
in 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:
saleCompleted
in interfacePersistenceMechanism
- Throws:
SQLException
-
authorizeCompleted
Stores the results of an authorize transaction.- authorizationResult
- status
The current status must be PROCESSING.
- Specified by:
authorizeCompleted
in interfacePersistenceMechanism
- Throws:
SQLException
-
voidCompleted
- Specified by:
voidCompleted
in interfacePersistenceMechanism
- Throws:
SQLException
-