public class PaymentConfigurationUtil
extends java.lang.Object
Constructor and Description |
---|
PaymentConfigurationUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addPaymentMethodToConfig(java.lang.String configId,
java.lang.String type,
java.lang.String methodName)
This method copies payment method directory from default group to the
directory of the payment group with configId.
|
static void |
copyDir(java.lang.String sDir,
java.lang.String tDir)
This method copies all files from original directory to target directory.
|
static void |
copyFile(java.io.InputStream ins,
java.io.OutputStream outs)
This method copies the contents from the specified InputStream to The specified OutputStream.
|
static void |
createPaymentConfiguration(java.lang.String configId,
java.lang.String type,
java.lang.String methodName)
This method creates new directory under configuration root with the name of the payment group configuration id, which copies basic file from
default directory.
|
static java.util.ArrayList |
getAvailablePaymentConfigurations(java.lang.String type)
This method gets all available payment/refund configurations with specified type.
|
static java.lang.String |
getJspsnippet(java.lang.String configId,
java.lang.String type)
This method gets the jspsnippet under the payment group configuration id directory
for the specified type.
|
static java.lang.String |
getPaymentConfigurationMethod(java.lang.String configId,
java.lang.String type)
This method gets all of payment methods name under the payment group configuration id directory for the specified type.
|
static java.util.ArrayList |
getPaymentConfigurations(java.lang.String type)
This method gets all payment configurations of the specified type.
|
static void |
removePaymentConfiguration(java.lang.String configId,
java.lang.String type)
This method removes an existing directory under configuration root with the name of the payment group configuration id.
|
static void |
updatePaymentMethod(java.lang.String configId,
java.lang.String type,
java.lang.String newMethod)
This method updates a payment configuration from configId directory.
|
public static java.util.ArrayList getAvailablePaymentConfigurations(java.lang.String type)
type
- The specified payment/refund methods typepublic static java.lang.String getJspsnippet(java.lang.String configId, java.lang.String type)
configId
- The payment group configuration idtype
- The payment/refund method typepublic static java.lang.String getPaymentConfigurationMethod(java.lang.String configId, java.lang.String type)
configId
- The payment group configuration idtype
- The payment/refund typepublic static java.util.ArrayList getPaymentConfigurations(java.lang.String type)
type
- The payment/refund typepublic static void addPaymentMethodToConfig(java.lang.String configId, java.lang.String type, java.lang.String methodName)
configId
- The payment group configuration idtype
- The payment/refund idmethodName
- The payment/refund method namepublic static void copyDir(java.lang.String sDir, java.lang.String tDir) throws java.io.FileNotFoundException, java.io.IOException
sDir
- The original directorytDir
- The target directoryjava.io.FileNotFoundException
- In case of file not found errorjava.io.IOException
- In case of IO errorpublic static void copyFile(java.io.InputStream ins, java.io.OutputStream outs) throws java.io.IOException
ins
- Current InputStreamouts
- Current OutputStreamjava.io.IOException
- In case of any IO errorpublic static void createPaymentConfiguration(java.lang.String configId, java.lang.String type, java.lang.String methodName)
configId
- The payment group configuration idtype
- The payment/refund typemethodName
- The method namepublic static void removePaymentConfiguration(java.lang.String configId, java.lang.String type)
configId
- The payment group configuration idtype
- The payment/refund typepublic static void updatePaymentMethod(java.lang.String configId, java.lang.String type, java.lang.String newMethod)
configId
- The payment group configuration idtype
- The payment/refund typenewMethod
- The new payment method