com.ibm.commerce.rules
Class RulesSystemComponentConfiguration

java.lang.Object
  |
  +--com.ibm.commerce.rules.RulesSystemComponentConfiguration
All Implemented Interfaces:
ComponentConfiguration

public class RulesSystemComponentConfiguration
extends java.lang.Object
implements ComponentConfiguration

The WCS component configuration for the Rules System component. See the documentation for ComponentConfiguration for details. The various constructors can be used during testing; WCS will only call the no-argument constructor.


Field Summary
static java.lang.String COPYRIGHT
           
 
Constructor Summary
RulesSystemComponentConfiguration()
          Called by the ComponentManager.
RulesSystemComponentConfiguration(com.ibm.commerce.rules.blaze.BlazeRuleServer aPersonalizationRuleServer, JustInTimeServiceManager aJustInTimeServiceManager)
           
RulesSystemComponentConfiguration(boolean anEnabled, java.io.File aRepositoryBase, WcsLoggingEventListener aWcsLoggingEventListener, com.ibm.commerce.rules.blaze.BlazeRuleServer aPersonalizationRuleServer, JustInTimeServiceManager aJustInTimeServiceManager)
          This version of the constructor requires a personalization rule server to be passed in; if you're going to specify one, it must not be null.
RulesSystemComponentConfiguration(boolean anEnabled, java.io.File aRepositoryBase, WcsLoggingEventListener aWcsLoggingEventListener, JustInTimeServiceManager aJustInTimeServiceManager)
          This version of the constructor does not require a personalization rule server to be passed in; it will instead create one from the database configuration.
 
Method Summary
protected  JustInTimeServiceManager createJustInTimeServiceManager()
           
protected  com.ibm.commerce.rules.blaze.BlazeRuleServer createRuleServer(com.ibm.commerce.rules.blaze.BlazeRuleServerConfiguration serverConfiguration)
           
protected  ConfigureRuleServerCommand createRulesSystemConfigurationCommand()
          Creates an instance of the command used to configure the personalization rule server.
 void destroy()
          This destroy method will be called when the request servlet is stopped or destroyed.
 void enable(boolean enabled)
          This method is used to dynamically enable or disable a component.
 JustInTimeServiceManager getJustInTimeServiceManager()
           
 com.ibm.commerce.rules.blaze.BlazeRuleServer getPersonalizationRuleServer()
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.io.File getRepositoryBase()
           
 void init(org.w3c.dom.Element node)
          The initilization method for the component.
protected  void installWcsLoggingEventListener(com.ibm.commerce.services.logging.ComponentLoggingService aComponentLoggingService)
           
 boolean isEnabled()
           
static boolean isRegisteredWithWcs()
           
protected  java.lang.String retrieveAttribute(org.w3c.dom.Element configuration, java.lang.String attributeName)
           
static RulesSystemComponentConfiguration retrieveFromWcs()
          Retrieves the instance of this class registered for WCS.
protected  com.ibm.commerce.rules.blaze.BlazeRuleServer startRuleServer(java.lang.String serverName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

RulesSystemComponentConfiguration

public RulesSystemComponentConfiguration()
Called by the ComponentManager.

RulesSystemComponentConfiguration

public RulesSystemComponentConfiguration(com.ibm.commerce.rules.blaze.BlazeRuleServer aPersonalizationRuleServer,
                                         JustInTimeServiceManager aJustInTimeServiceManager)

RulesSystemComponentConfiguration

public RulesSystemComponentConfiguration(boolean anEnabled,
                                         java.io.File aRepositoryBase,
                                         WcsLoggingEventListener aWcsLoggingEventListener,
                                         com.ibm.commerce.rules.blaze.BlazeRuleServer aPersonalizationRuleServer,
                                         JustInTimeServiceManager aJustInTimeServiceManager)
This version of the constructor requires a personalization rule server to be passed in; if you're going to specify one, it must not be null. If you do not wish to specify one, use the version of the constructor that does not take one as a parameter.

RulesSystemComponentConfiguration

public RulesSystemComponentConfiguration(boolean anEnabled,
                                         java.io.File aRepositoryBase,
                                         WcsLoggingEventListener aWcsLoggingEventListener,
                                         JustInTimeServiceManager aJustInTimeServiceManager)
This version of the constructor does not require a personalization rule server to be passed in; it will instead create one from the database configuration. To do this, you must specify the name, instead.
Method Detail

createJustInTimeServiceManager

protected JustInTimeServiceManager createJustInTimeServiceManager()
                                                           throws ECException

createRuleServer

protected com.ibm.commerce.rules.blaze.BlazeRuleServer createRuleServer(com.ibm.commerce.rules.blaze.BlazeRuleServerConfiguration serverConfiguration)

createRulesSystemConfigurationCommand

protected ConfigureRuleServerCommand createRulesSystemConfigurationCommand()
                                                                    throws ECException
Creates an instance of the command used to configure the personalization rule server.

destroy

public void destroy()
Description copied from interface: ComponentConfiguration
This destroy method will be called when the request servlet is stopped or destroyed.
Specified by:
destroy in interface ComponentConfiguration
See Also:
ComponentConfiguration

enable

public void enable(boolean enabled)
            throws java.lang.Exception
Description copied from interface: ComponentConfiguration
This method is used to dynamically enable or disable a component.

Specified by:
enable in interface ComponentConfiguration
See Also:
ComponentConfiguration

getJustInTimeServiceManager

public JustInTimeServiceManager getJustInTimeServiceManager()

getPersonalizationRuleServer

public com.ibm.commerce.rules.blaze.BlazeRuleServer getPersonalizationRuleServer()

getProperty

public java.lang.Object getProperty(java.lang.String name)

getRepositoryBase

public java.io.File getRepositoryBase()

init

public void init(org.w3c.dom.Element node)
          throws ECApplicationException
Description copied from interface: ComponentConfiguration
The initilization method for the component. This method will be called during initializtion of the Request Servlet.

Specified by:
init in interface ComponentConfiguration
See Also:
ComponentConfiguration

installWcsLoggingEventListener

protected void installWcsLoggingEventListener(com.ibm.commerce.services.logging.ComponentLoggingService aComponentLoggingService)

isEnabled

public boolean isEnabled()

isRegisteredWithWcs

public static boolean isRegisteredWithWcs()

retrieveAttribute

protected java.lang.String retrieveAttribute(org.w3c.dom.Element configuration,
                                             java.lang.String attributeName)
                                      throws ECApplicationException

retrieveFromWcs

public static RulesSystemComponentConfiguration retrieveFromWcs()
Retrieves the instance of this class registered for WCS.
Returns:
com.ibm.commerce.rules.RulesSystemComponentConfiguration

startRuleServer

protected com.ibm.commerce.rules.blaze.BlazeRuleServer startRuleServer(java.lang.String serverName)
                                                                throws ECException,
                                                                       RuleServerNotFoundException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object