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) |
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.
|
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.ObjectModuleFacadeBean 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.
|
abstract void |
validatePaymentInstruction() |
public static final java.lang.String COPYRIGHT
public PluginAdapter(PluginConfigurationImpl aPluginData, boolean queriesSupportedFlag)
aPluginData
- The plugin configuration data for this plugin adapter.queriesSupportedFlag
- The flag indicates if the queries is supported.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
forceClose
- A boolean indicating if the batch should be closed by force.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
InternalException
CommunicationException
public abstract java.lang.String preprocessProviderResponseData() throws InternalException, CommunicationException
InternalException
CommunicationException
public abstract java.util.Map processProviderResponse() throws InternalException, CommunicationException
InternalException
CommunicationException
public final void setPayInstData(com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData data)
data
- The data bean of PPCPayInst object.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)
pluginConfigurationData
- The PluginConfigurationImpl to set.public final PluginConfigurationImpl getPluginConfigurationData()
public final void setRetry(boolean b)
b
- The retry flag.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.
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- Thrown when the clone is not supported.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
InternalException
Plugin.checkHealth()
public final void setCreditData(com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData data)
data
- The data bean of PPCCredit object.public final com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData getCreditData()
public final void setPayTranData(com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData data)
data
- The data bean of PPCPayTran object.public final void setPaymentData(com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData data)
data
- The data bean of PPCPayment object.public final com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData getPaymentData()
public final void setPaymentRequiresAttention(boolean b)
b
- The flag.public final boolean isPaymentRequiresAttention()
public final void setPiExtendedDataCollect(java.util.Collection collection)
collection
- The collection of PPCExtDataData.public final java.util.Collection getPiExtendedDataCollect()
public abstract boolean isPluginLoaded()
public final void setKeywordConf(java.util.HashMap map)
map
- The HashMap of the Keyword configurations. The key is Keyword.getName(), the value
is Keyword.public final java.util.HashMap getKeywordConf()
public final void setKeywordsMapping(java.util.HashMap map)
map
- The keywords mapping.public final java.util.HashMap getKeywordsMapping()
public final void setOmf(com.ibm.commerce.payments.plugincontroller.beans.ObjectModuleFacadeBean local)
local
- The local interface of ObjectModuleFacade.public final void setPaymentGroupId(java.lang.String string)
string
- The payment group id.public final java.lang.String getPaymentGroupId()
public final void setPluginData(PluginConfigurationImpl impl)
impl
- The plugin configuration .public final PluginConfigurationImpl getPluginData()
public final void setPluginException(PluginException exception)
exception
- The plugin exception.public final PluginException getPluginException()
public final void setQueriesSupported(boolean b)
b
- If the query is supported.public final boolean isQueriesSupported()
public final void setRecoverable(boolean b)
b
- The flag for PaymentInstruction.public final boolean isRecoverable()
public final void setRequestedAmount(java.math.BigDecimal decimal)
decimal
- The amount which PPC asks the plugin to process.public final java.math.BigDecimal getRequestedAmount()
public final void setTargetLocale(java.util.Locale localTargetLocale)
localTargetLocale
- The targetLocale to set.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)
orderChannelId
- The order channel identifier to set.public final java.lang.String getOrderChannelId()
public final void setTxExtendedDataCollect(java.util.Collection collection)
collection
- The collection of PPCExtDataData.public final java.util.Collection getTxExtendedDataCollect()
public final void setInitException(java.lang.Throwable exception)
exception
- The exception during the plugin initialization.public final java.lang.Throwable getInitException()
public final void setPluginPaymentInstructionProtocolPropertyConfigColl(java.util.HashMap collection)
collection
- The collection to set.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)
localPPCBatchData
- the current batch data access bean.public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map getPaymentSentivieData()
public void setPaymentSentivieData(java.util.Map localPaymentSentivieData)
localPaymentSentivieData
- The paymentSentivieData to set.public java.util.Map getAdditionalInformation()
public void setAdditionalInformation(java.util.Map localAdditionalInformation)
localAdditionalInformation
- The additionalInformation to set.public void setCallBackRequest(java.util.Map params)
params
- public java.util.Map getCallBackRequest()