com.ibm.commerce.edp.config

Class PaymentConfigurationUtil

  • java.lang.Object
    • com.ibm.commerce.edp.config.PaymentConfigurationUtil


  • public class PaymentConfigurationUtil
    extends java.lang.Object
    This class is a utility class that provides querying/editing the payment configuration.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PaymentConfigurationUtil

        public PaymentConfigurationUtil()
    • Method Detail

      • getAvailablePaymentConfigurations

        public static java.util.ArrayList getAvailablePaymentConfigurations(java.lang.String type)
        This method gets all available payment/refund configurations with specified type.
        Parameters:
        type - The specified payment/refund methods type
        Returns:
        All available payment/refund configurations with specified type
      • getJspsnippet

        public 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.
        Parameters:
        configId - The payment group configuration id
        type - The payment/refund method type
        Returns:
        The jsp snippet name
      • getPaymentConfigurationMethod

        public 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.
        Parameters:
        configId - The payment group configuration id
        type - The payment/refund type
        Returns:
        The payment methods name
      • getPaymentConfigurations

        public static java.util.ArrayList getPaymentConfigurations(java.lang.String type)
        This method gets all payment configurations of the specified type.
        Parameters:
        type - The payment/refund type
        Returns:
        All payment configuration of the specified type
      • addPaymentMethodToConfig

        public 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.
        Parameters:
        configId - The payment group configuration id
        type - The payment/refund id
        methodName - The payment/refund method name
      • copyDir

        public static void copyDir(java.lang.String sDir,
                                   java.lang.String tDir)
                            throws java.io.FileNotFoundException,
                                   java.io.IOException
        This method copies all files from original directory to target directory.
        Parameters:
        sDir - The original directory
        tDir - The target directory
        Throws:
        java.io.FileNotFoundException - In case of file not found error
        java.io.IOException - In case of IO error
      • copyFile

        public static void copyFile(java.io.InputStream ins,
                                    java.io.OutputStream outs)
                             throws java.io.IOException
        This method copies the contents from the specified InputStream to The specified OutputStream.
        Parameters:
        ins - Current InputStream
        outs - Current OutputStream
        Throws:
        java.io.IOException - In case of any IO error
      • createPaymentConfiguration

        public 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.
        Parameters:
        configId - The payment group configuration id
        type - The payment/refund type
        methodName - The method name
      • removePaymentConfiguration

        public 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.
        Parameters:
        configId - The payment group configuration id
        type - The payment/refund type
      • updatePaymentMethod

        public static void updatePaymentMethod(java.lang.String configId,
                                               java.lang.String type,
                                               java.lang.String newMethod)
        This method updates a payment configuration from configId directory.
        Parameters:
        configId - The payment group configuration id
        type - The payment/refund type
        newMethod - The new payment method