com.ibm.commerce.edp.config

Class ConfigurationService

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


  • public class ConfigurationService
    extends java.lang.Object
    This class is the internal Payment Rules configuration service, which provides in-memory cached details of Payment Rules XML configuration files.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static EDPGlobalConfigs getEdpGlobalConfigs()
      This method returns the configurations, which affects whole Payment Rules behaviors.
      static EDPTicklerFactory getEDPTicklerFactory()
      This method returns the Payment Rules tickler factory specified in Payment Rules global configuration, such as EDPLog type factory.
      static PaymentGroupConfiguration getPaymentGroupConfiguration(java.lang.String paymentGroupName)
      This method gets the configuration of the payment group with a specified name.
      static java.lang.String getTargetState(java.lang.String paymentGrpId, java.lang.String paymentRule, int phase)
      This method gets the target payment state in current configuration for specified payment group id, payment rule, business event phase.
      static void reload()
      This method reloads configuration data into memory from xml files, which is used by the management interface to reload the whole rule configuration data.
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ConfigurationService

        public ConfigurationService()
    • Method Detail

      • getEDPTicklerFactory

        public static EDPTicklerFactory getEDPTicklerFactory()
        This method returns the Payment Rules tickler factory specified in Payment Rules global configuration, such as EDPLog type factory.
        Returns:
        The specified EDP tickler factory in global configuration
      • getEdpGlobalConfigs

        public static EDPGlobalConfigs getEdpGlobalConfigs()
        This method returns the configurations, which affects whole Payment Rules behaviors.

        This object returned has all configure values loaded from XML configuration file.

        This method does not validate XML file against XSD file.

        Returns:
        an EDPGlobalConfigs object, which has all EDP global configuration values
      • getPaymentGroupConfiguration

        public static PaymentGroupConfiguration getPaymentGroupConfiguration(java.lang.String paymentGroupName)
        This method gets the configuration of the payment group with a specified name. The name is used internally to access the rule configuration data by the business logic objects. If null payment group name passed and the named payment group not found, the default configuration is used.
        Parameters:
        paymentGroupName - The name of the payment group from which we want to access the configuration data
        Returns:
        A PaymentGroupConfiguration object that stores configuration data
      • getTargetState

        public static java.lang.String getTargetState(java.lang.String paymentGrpId,
                                                      java.lang.String paymentRule,
                                                      int phase)
                                               throws RuleException,
                                                      InternalException
        This method gets the target payment state in current configuration for specified payment group id, payment rule, business event phase.
        Parameters:
        paymentGrpId - The current payment group id
        paymentRule - The current payment rule
        phase - The current business event phase
        Returns:
        The target payment state in current configuration by the specified parameters
        Throws:
        RuleException - In case of any payment rule error
        InternalException - In case of any internal error
      • reload

        public static void reload()
        This method reloads configuration data into memory from xml files, which is used by the management interface to reload the whole rule configuration data. It is useful for tests and when one wants to dynamically change the xml files without having to restart the server.