public abstract class PluginAdapter
extends java.lang.Object
implements java.lang.Cloneable
The PluginAdapter is used to provide a consistent API for PluginController to call plugin. Different plugin specification version will provide different subclass of PluginAdapter. For plugin specification ver_1, PluginAdapter_V1 is provided. The PluginController calls PluginFactory to find or create the appropriate PluginAdapter. It maybe implements different plugin spec version, sets the required parameters and invokes payment action against the PluginAdapter. The PluginAdapter in turn calls plugin to process the transaction. The process flow is:
1. PPC client (EDP) invokes appropriate payment action determine by EDP rules and configuration.
2. PPC ask the Factory to get the Plugin to process this payment action.
3. PluginFactory finds or create the appropriate PluginAdapter.
4. PPC invokes payment action against the PluginAdapter.
5. PluginAdatpter created the appropriate object within the Object Model.
6. PluginAdatpter builds the appropriate information for the plugin to process the request per the plugin specification.
7. PluginAdatpter invokes payment action against it associated Plugin.
8. Plugin send request to back-end system.
9. Plugin returns and PluginAdapter updates Object Model.
10. PluginAdatpter returns and PPC retrieves the object from the database.
11. PPC builds the appropriate value and returns to PPC Client.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
Constructor and Description |
---|
PluginAdapter()
This method is a default constructor for PaymentPlugin.
|
PluginAdapter(PluginConfigurationImpl aPluginData, boolean queriesSupportedFlag)
This method is a constructor with a plugin configuration data.
|
Modifier and Type | Method and Description |
---|---|
abstract void | approve() |
abstract void | approveAndDeposit() |
abstract boolean | checkHealth() |
abstract void | checkPaymentInstruction() |
java.lang.Object | clone()
This method overrides the clone() function of Object.
|
abstract void | credit() |
abstract void | deposit() |
java.util.Map | getAdditionalInformation()
This method returns the additional information.
|
abstract java.lang.String | getAuthenticationURL()
This method sends the build popup URL of punch-out payment to plugin, then gets the URL.
|
abstract java.math.BigDecimal | getAvailableBalance() |
abstract void | getBatch()
This method gets the batch results from the paymentech back end.
|
java.util.Map | getCallBackRequest()
This method returns the parameters from callback request.
|
abstract void | getCredit() |
com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData | getCreditData()
This method gets the data bean of PPCCredit object , used as the parameter between PPC and PluginAdapter.
|
java.lang.Throwable | getInitException()
This method checks if there is some exception during the plugin initialization, use this method to get the exception.
|
java.util.HashMap | getKeywordConf()
This method gets the configurations for the keywords: mask, plain, searchable, removeAfterApproval.
|
java.util.HashMap | getKeywordsMapping()
This method sets the keywords mapping.
|
abstract java.lang.String | getMessage(java.lang.String messageKey, java.util.Locale locale) |
com.ibm.commerce.payments.plugincontroller.beans.ObjectModuleFacadeLocal | getOmf()
This method gets the local interface of ObjectModuleFacade.
|
java.lang.String | getOrderChannelId()
This method returns the order channel identifier.
|
com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData | getPayInstData()
This method gets the data bean of PPCPayInst object, used as the parameter between PPC and PluginAdapter.
|
abstract void | getPayment() |
com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData | getPaymentData()
This method gets the data bean of PPCPayment object , used as the parameter between PPC and PluginAdapter.
|
java.lang.String | getPaymentGroupId()
This method gets the payment group id.
|
java.util.Map | getPaymentSentivieData() |
com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData | getPayTranData()
This method gets the data bean of PPCPayTran object, used as the parameter between PPC and PluginAdapter.
|
java.util.Collection | getPiExtendedDataCollect()
This method gets the collection of PPCExtDataData which are associated to the PPCPayInst, used as the parameter between PPC and PluginAdapter.
|
PluginConfigurationImpl | getPluginConfigurationData()
This method gets the PluginConfigurationImpl.
|
protected PluginContext | getPluginContext()
This method gets the plugin context from the plugin configuration data and the target locale.
|
PluginConfigurationImpl | getPluginData()
This method gets the plugin configuration data.
|
PluginException | getPluginException()
This method gets the plugin exception.
|
java.util.HashMap | getPluginPaymentInstructionProtocolPropertyConfigColl()
This method gets the list of properties in plugin deployment description, defines how plugin expect PPC handle payment instruction protocol data DB persistence.
|
com.ibm.commerce.payments.plugincontroller.beans.PPCBatchData | getPPCBatchData()
This method returns the current batch data access bean.
|
java.math.BigDecimal | getRequestedAmount()
This method gets the amount which PPC asks the plugin to process.
|
java.util.Locale | getTargetLocale()
This method gets the targetLocale.
|
java.util.Collection | getTxExtendedDataCollect()
This method gets the collection of PPCExtDataData which are associated to the PPCPayTran, used as the parameter between PPC and PluginAdapter.
|
abstract void | initAuthenticationSession()
This method sends the build popup URL of punch-out payment to plugin, then gets the URL.
|
boolean | isPaymentRequiresAttention()
This method checks if the Payment requires attention though it is successful.
|
abstract boolean | isPluginLoaded()
This method checks if this plugin is loaded successfully.
|
boolean | isQueriesSupported()
This method checks if this plugin support the query api (PaymentQuery).
|
boolean | isRecoverable()
This method checks if the PaymentInstruction can be used for further transaction in the future when the transaction fails.
|
boolean | isRetry()
This method checks if this payment action is to retry.
|
abstract java.lang.String | preprocessProviderResponseData()
This method executes the verification with PSP and gets the result of payment processing.
|
abstract java.util.Map | processProviderResponse()
This method executes the verification with PSP and gets the result of payment processing.
|
abstract void | reverseApproval() |
abstract void | reverseCredit() |
abstract void | reverseDeposit() |
void | setAdditionalInformation(java.util.Map localAdditionalInformation)
This method sets the additional information.
|
void | setCallBackRequest(java.util.Map params)
This method sets the parameters from callback request.
|
void | setCreditData(com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData data)
This method sets the data bean of PPCCredit object , used as the parameter between PPC and PluginAdapter.
|
void | setInitException(java.lang.Throwable exception)
This method checks if there is some exception during the plugin initialization, use this method to set it.
|
void | setKeywordConf(java.util.HashMap map)
This method sets the configurations for the keywords: mask, plain, searchable, removeAfterApproval.
|
void | setKeywordsMapping(java.util.HashMap map)
This method sets the keywords mapping.
|
void | setOmf(com.ibm.commerce.payments.plugincontroller.beans.ObjectModuleFacadeLocal local)
This method sets the local interface of ObjectModuleFacade.
|
void | setOrderChannelId(java.lang.String orderChannelId)
This method sets the order channel identifier.
|
void | setPayInstData(com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData data)
This method sets the data bean of PPCPayInst object , used as the parameter between PPC and PluginAdapter.
|
void | setPaymentData(com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData data)
This method sets the data bean of PPCPayment object , used as the parameter between PPC and PluginAdapter.
|
void | setPaymentGroupId(java.lang.String string)
This method sets the payment group id.
|
void | setPaymentRequiresAttention(boolean b)
This method sets the flag if the Payment requires attention though it is successful.
|
void | setPaymentSentivieData(java.util.Map localPaymentSentivieData) |
void | setPayTranData(com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData data)
This method sets the data bean of PPCPayTran object , used as the parameter between PPC and PluginAdapter.
|
void | setPiExtendedDataCollect(java.util.Collection collection)
This method sets the collection of PPCExtDataData which are associated to the PPCPayInst, used as the parameter between PPC and PluginAdapter.
|
void | setPluginConfigurationData(PluginConfigurationImpl pluginConfigurationData)
This method sets the PluginConfigurationImpl.
|
void | setPluginData(PluginConfigurationImpl impl)
This method sets the plugin configuration data.
|
void | setPluginException(PluginException exception)
This method sets the plugin exception.
|
void | setPluginPaymentInstructionProtocolPropertyConfigColl(java.util.HashMap collection)
This method sets the plugin payment instruction protocol property configuration collection
|
void | setPPCBatchData(com.ibm.commerce.payments.plugincontroller.beans.PPCBatchData localPPCBatchData)
This method sets the current batch data access bean.
|
void | setQueriesSupported(boolean b)
This method marks if the query is supported.
|
void | setRecoverable(boolean b)
This method sets the flag to mark if the PaymentInstruction can be used for further transaction in the future.
|
void | setRequestedAmount(java.math.BigDecimal decimal)
This method sets the amount which PPC asks the plugin to process.
|
void | setRetry(boolean b)
This method marks id retry is enabled.
|
void | setTargetLocale(java.util.Locale localTargetLocale)
This method sets the targetLocale.
|
abstract void | settleBatch(boolean forceClose)
This method sends the batch request that contains all the credit/deposit transactions need to be batched by calling the batch API of the plugins.
|
void | setTxExtendedDataCollect(java.util.Collection collection)
This method sets the collection of PPCExtDataData which are associated to the PPCPayTran, used as the parameter between PPC and PluginAdapter.
|
java.lang.String | toString()
This method gets a human-readable representation of this object.
|
protected java.util.Collection | translateExtendedData(java.util.Collection nontranslatedExtendedDataCollection)
This method translates the keyword from one name to another.
|
abstract void | validatePaymentInstruction() |
public static final java.lang.String COPYRIGHT
public PluginAdapter(PluginConfigurationImpl aPluginData, boolean queriesSupportedFlag)
public PluginAdapter()
public abstract java.math.BigDecimal getAvailableBalance() throws InputException, BackendException, InternalException, ConfigException
public abstract void getCredit() throws InputException, BackendException, InternalException, ConfigException
public abstract java.lang.String getMessage(java.lang.String messageKey, java.util.Locale locale) throws InputException, BackendException, InternalException, ConfigException
public abstract void getPayment() throws InputException, BackendException, InternalException, ConfigException
public abstract void approve() throws InputException, BackendException, InternalException, ConfigException
public abstract void approveAndDeposit() throws InputException, BackendException, InternalException, ConfigException
public abstract void settleBatch(boolean forceClose) throws InputException, CommunicationException, InternalException, ConfigException
public abstract void getBatch() throws InputException, CommunicationException, InternalException, ConfigException
public abstract void checkPaymentInstruction() throws InputException, BackendException, InternalException, ConfigException
public abstract void initAuthenticationSession() throws InternalException, CommunicationException
public abstract java.lang.String getAuthenticationURL() throws InternalException, CommunicationException
public abstract java.lang.String preprocessProviderResponseData() throws InternalException, CommunicationException
public abstract java.util.Map processProviderResponse() throws InternalException, CommunicationException
public final void setPayInstData(com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData data)
public final com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData getPayInstData()
public final com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData getPayTranData()
public final void setPluginConfigurationData(PluginConfigurationImpl pluginConfigurationData)
public final PluginConfigurationImpl getPluginConfigurationData()
public final void setRetry(boolean b)
public final boolean isRetry()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
This method overrides the clone() function of Object. The PluginFactory will keep a hashmap of plugin's name and the plugin's plugin adapter. When PPC call the PluginFactory to get the plugin adapter's implementation, a clone of the one in the hashmap will return to PPC.
public abstract void credit() throws InputException, BackendException, InternalException, ConfigException
public abstract void deposit() throws InputException, BackendException, InternalException, ConfigException
public abstract void reverseApproval() throws InputException, BackendException, InternalException, ConfigException
public abstract void reverseCredit() throws InputException, BackendException, InternalException, ConfigException
public abstract void reverseDeposit() throws InputException, BackendException, InternalException, ConfigException
public abstract void validatePaymentInstruction() throws InputException, BackendException, InternalException, ConfigException
public abstract boolean checkHealth() throws InternalException
public final void setCreditData(com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData data)
public final com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData getCreditData()
public final void setPayTranData(com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData data)
public final void setPaymentData(com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData data)
public final com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData getPaymentData()
public final void setPaymentRequiresAttention(boolean b)
public final boolean isPaymentRequiresAttention()
public final void setPiExtendedDataCollect(java.util.Collection collection)
public final java.util.Collection getPiExtendedDataCollect()
public abstract boolean isPluginLoaded()
public final void setKeywordConf(java.util.HashMap map)
public final java.util.HashMap getKeywordConf()
public final void setKeywordsMapping(java.util.HashMap map)
public final java.util.HashMap getKeywordsMapping()
public final void setOmf(com.ibm.commerce.payments.plugincontroller.beans.ObjectModuleFacadeLocal local)
public final com.ibm.commerce.payments.plugincontroller.beans.ObjectModuleFacadeLocal getOmf()
public final void setPaymentGroupId(java.lang.String string)
public final java.lang.String getPaymentGroupId()
public final void setPluginData(PluginConfigurationImpl impl)
public final PluginConfigurationImpl getPluginData()
public final void setPluginException(PluginException exception)
public final PluginException getPluginException()
public final void setQueriesSupported(boolean b)
public final boolean isQueriesSupported()
public final void setRecoverable(boolean b)
public final boolean isRecoverable()
public final void setRequestedAmount(java.math.BigDecimal decimal)
public final java.math.BigDecimal getRequestedAmount()
public final void setTargetLocale(java.util.Locale localTargetLocale)
public final java.util.Locale getTargetLocale()
This method gets the targetLocale. This is the Locale used by the target Client (store front or CSR applications). The controller will set this value on every request so the plugin can return the appropriate translated message in the Exceptions.
public final void setOrderChannelId(java.lang.String orderChannelId)
public final java.lang.String getOrderChannelId()
public final void setTxExtendedDataCollect(java.util.Collection collection)
public final java.util.Collection getTxExtendedDataCollect()
public final void setInitException(java.lang.Throwable exception)
public final java.lang.Throwable getInitException()
public final void setPluginPaymentInstructionProtocolPropertyConfigColl(java.util.HashMap collection)
public final java.util.HashMap getPluginPaymentInstructionProtocolPropertyConfigColl()
public com.ibm.commerce.payments.plugincontroller.beans.PPCBatchData getPPCBatchData()
public void setPPCBatchData(com.ibm.commerce.payments.plugincontroller.beans.PPCBatchData localPPCBatchData)
public java.lang.String toString()
protected PluginContext getPluginContext()
protected java.util.Collection translateExtendedData(java.util.Collection nontranslatedExtendedDataCollection)
public java.util.Map getPaymentSentivieData()
public void setPaymentSentivieData(java.util.Map localPaymentSentivieData)
public java.util.Map getAdditionalInformation()
public void setAdditionalInformation(java.util.Map localAdditionalInformation)
public void setCallBackRequest(java.util.Map params)
public java.util.Map getCallBackRequest()