Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
Copyright.
|
Constructor and Description |
---|
LOCPluginBean() |
Modifier and Type | Method and Description |
---|---|
FinancialTransaction |
approve(PluginContext pluginContext,
FinancialTransaction paymentTransaction,
boolean retry)
This method checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present.
|
FinancialTransaction |
approveAndDeposit(PluginContext pluginContext,
FinancialTransaction depositTransaction,
boolean retry)
This method checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present.
|
boolean |
checkHealth()
This method checks whether XML configuration for the Plugin is available.
|
void |
checkPaymentInstruction(PluginContext pluginContext,
PaymentInstruction paymentInstruction)
This method checks if StoreID, buyerOrgID, credit line account number for the specified PaymentInstruction are present and indicate everything is OK.
|
FinancialTransaction |
credit(PluginContext pluginContext,
FinancialTransaction creditTransaction,
boolean retry)
This method checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present.
|
FinancialTransaction |
deposit(PluginContext pluginContext,
FinancialTransaction paymentTransaction,
boolean retry)
This method receives the deposit request, checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present.
|
java.lang.String |
getMessage(PluginContext pluginContext,
java.lang.String messageKey)
This method returns the message from the
PluginContext according to the key of the message. |
void |
postConstruct()
This method is the implementation of the
ejbCreate() method. |
FinancialTransaction |
reverseApproval(PluginContext pluginContext,
FinancialTransaction paymentTransaction,
boolean retry)
This method checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present.
|
FinancialTransaction |
reverseCredit(PluginContext pluginContext,
FinancialTransaction creditTransaction,
boolean retry)
This method checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present.
|
FinancialTransaction |
reverseDeposit(PluginContext pluginContext,
FinancialTransaction paymentTransaction,
boolean retry)
This method checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present.
|
void |
validatePaymentInstruction(PluginContext pluginContext,
PaymentInstruction paymentInstruction)
This method checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present.
|
public static final java.lang.String COPYRIGHT
public java.lang.String getMessage(PluginContext pluginContext, java.lang.String messageKey)
PluginContext
according to the key of the message.getMessage
in interface Plugin
pluginContext
- The plug-in context to be used in this request.messageKey
- The error unique key.messageKey
itself.Plugin.getMessage(PluginContext,String)
public FinancialTransaction approve(PluginContext pluginContext, FinancialTransaction paymentTransaction, boolean retry) throws CommunicationException, PluginException
approve
in interface Plugin
pluginContext
- Contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.paymentTransaction
- Contains the payment instruction and the amount requested to be approved.retry
- Indicates if this is a retry of the operation or not.PluginInvalidParameterException
- raised with message PLUGIN_PARAMS_INVALID whenever account number or storeid or buyerorgid the payment transaction associated to is null.PluginException
- Thrown when any exception conditions specified by the
PluginException
hierarchy are met; for more details, read the
plug-in exceptions hierarchy Javadocs.CommunicationException
Plugin.approve(PluginContext,FinancialTransaction,boolean)
public FinancialTransaction approveAndDeposit(PluginContext pluginContext, FinancialTransaction depositTransaction, boolean retry) throws FunctionNotSupportedException, PluginException
approveAndDeposit
in interface Plugin
pluginContext
- Contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.depositTransaction
- Contains the amount and other data required to process the action.retry
- Indicates if his is a retry of the operation or not.InvalidDataException
- raised with message PLUGIN_PARAM_INVALID whenever account number or store or buyerOrgid of PaymentInstructuon the transaction associated with is null.PluginException
- Thrown when any exception conditions specified by the
PluginException
hierarchy are met; for more details, read the
plug-in exceptions hierarchy Javadocs.FunctionNotSupportedException
Plugin.approveAndDeposit(PluginContext,FinancialTransaction,boolean)
public void checkPaymentInstruction(PluginContext pluginContext, PaymentInstruction paymentInstruction) throws InvalidPaymentInstructionException, ConfigurationException, InvalidDataException
checkPaymentInstruction
in interface Plugin
pluginContext
- contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.paymentInstruction
- contains the Payment Method information plus any additional data require to process the payment.InvalidDataException
- thrown with message PLUGIN_PARAMS_INVALID if the paymentInstruction contains null accountnumber or store or buyserorgid.InvalidPaymentInstructionException
ConfigurationException
Plugin.checkPaymentInstruction(PluginContext,PaymentInstruction)
public FinancialTransaction credit(PluginContext pluginContext, FinancialTransaction creditTransaction, boolean retry) throws PluginException
credit
in interface Plugin
pluginContext
- Contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.creditTransaction
- Contains the amount and other data required to process the action.retry
- Indicates if his is a retry of the operation or not.InvalidDataException
- raised with message PLUGIN_PARAM_INVALID whenever account number or store or buyerOrgid of PaymentInstruction the transaction associated to is null.PluginException
- Thrown when any exception conditions specified by the
PluginException
hierarchy are met; for more details, read the
plug-in exceptions hierarchy Javadocs.Plugin.credit(PluginContext,FinancialTransaction,boolean)
public FinancialTransaction deposit(PluginContext pluginContext, FinancialTransaction paymentTransaction, boolean retry) throws PluginException
deposit
in interface Plugin
pluginContext
- Contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.paymentTransaction
- Contains the amount and other data required to process the action.retry
- Indicates if his is a retry of the operation or not.InvalidDataException
- raised with message PLUGIN_PARAMS_INVALID when account number or storeid or buyerorgid the payment transaction associated to is null.PluginException
- Thrown when any exception conditions specified by the
PluginException
hierarchy are met; for more details, read the
plug-in exceptions hierarchy Javadocs.Plugin.deposit(PluginContext,FinancialTransaction,boolean)
@PostConstruct public void postConstruct()
ejbCreate()
method. It calls the method LOCPluginInitializer.init()
to make sure LOCPlugin
logger initialization has run.javax.ejb.CreateException
public FinancialTransaction reverseApproval(PluginContext pluginContext, FinancialTransaction paymentTransaction, boolean retry) throws CommunicationException, PluginException
reverseApproval
in interface Plugin
pluginContext
- Contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.paymentTransaction
- Contains the amount and other data required to process the action.retry
- Indicates if his is a retry of the operation or not.InvalidDataException
- raised with message PLUGIN_PARAM_INVALID whenever account number or store or buyerOrgid of PaymentInstruction the transaction associated to is null.PluginException
- Thrown when any exception conditions specified by the
PluginException
hierarchy are met; for more details, read the
plug-in exceptions hierarchy Javadocs.CommunicationException
Plugin.reverseApproval(PluginContext,FinancialTransaction,boolean)
public FinancialTransaction reverseCredit(PluginContext pluginContext, FinancialTransaction creditTransaction, boolean retry) throws InvalidPaymentInstructionException, FunctionNotSupportedException, InvalidDataException
This method checks if StoreID, buyerOrgID, credit line account number for the specified Payment Instruction are present. If yes, it returns successfully; if no, it throws exceptions.
The credit can be a dependent credit or independent credit transaction.
reverseCredit
in interface Plugin
pluginContext
- Contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.creditTransaction
- Contains the amount and other data required to process the action.retry
- Indicates if his is a retry of the operation or not.InvalidDataException
- raised with message PLUGIN_PARAM_INVALID whenever account number or store or buyerOrgid of paymentInstruction the transaction associated to is null.InvalidPaymentInstructionException
FunctionNotSupportedException
Plugin.reverseCredit(PluginContext,FinancialTransaction,boolean)
public FinancialTransaction reverseDeposit(PluginContext pluginContext, FinancialTransaction paymentTransaction, boolean retry) throws FunctionNotSupportedException, PluginException
reverseDeposit
in interface Plugin
pluginContext
- Contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.paymentTransaction
- Contains the amount and other data required to process the action.retry
- Indicates if his is a retry of the operation or not.InvalidDataException
- raised with message PLUGIN_PARAM_INVALID whenever account number or store or buyerOrgid of paymentInstruction the transaction associated to is null.PluginException
- Thrown when any exception conditions specified by the
PluginException
hierarchy are met; for more details, read the
plug-in exceptions hierarchy Javadocs.FunctionNotSupportedException
Plugin.reverseDeposit(PluginContext,FinancialTransaction,boolean)
public void validatePaymentInstruction(PluginContext pluginContext, PaymentInstruction paymentInstruction) throws InvalidPaymentInstructionException, FunctionNotSupportedException
validatePaymentInstruction
in interface Plugin
pluginContext
- contains all the information needed by a plugin to process the request as obtained from the deployment descriptor.paymentInstruction
- contains the Payment Method information plus any additional data required to process the payment.PluginException
- by spec; InvalidDataException thrown with message PLUGIN_PARAM_INVALID whenever account number or store or buyerOrgid is null
.InvalidPaymentInstructionException
FunctionNotSupportedException
Plugin.validatePaymentInstruction(PluginContext,PaymentInstruction)
public boolean checkHealth()
This method checks whether XML configuration for the Plugin is available. For the SimpleOffline, if the XML file is missing, or renamed, or its content is invalid, then false is returned; otherwise true is returned. And for other Plugin, always true is returned since no corresponding XML configuration file exists.
This API is used by PluginFactory in accelerator. When false is returned, PluginFacotry will not put this plugin into the available collection. And further it will not be listed in the available payment methods in accelerator.
checkHealth
in interface Plugin
boolean
that is true
if the XML configuration for the Plugin is available,otherwise false
.