Package com.aoindustries.aoserv.master
Class MasterPersistenceMechanism
java.lang.Object
com.aoindustries.aoserv.master.MasterPersistenceMechanism
- All Implemented Interfaces:
PersistenceMechanism
Stores the information directly in the master server. Each instance should be used only within a single database transaction.
For another transaction, create a new instance.
- Author:
- AO Industries, Inc.
-
Constructor Summary
ConstructorDescriptionMasterPersistenceMechanism
(DatabaseConnection conn, InvalidateList invalidateList) -
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) 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)
-
Constructor Details
-
MasterPersistenceMechanism
-
-
Method Details
-
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
-