Class WebEventHandlerFactory

  • All Implemented Interfaces:
    EnumEventHandlerTypes, WebEventTags

    public class WebEventHandlerFactory
    extends AbstractEventHandlerFactory
    implements EnumEventHandlerTypes
    Deprecated.
    This factory is not used. The bean itself now is responsible to define and create instances of its default event-handler.
    This class represents a factory for instantiating various WebEventHandler objects. The type of event-handlers is retrieved from the EnumEventHandlerTypes

    This class has been deprecated. It's not used by the application anymore. In the new framework, beans are responsible to create their own event-handler instance. The bean defines what the default event-hanlder is by implementing the AbstractWebComponent.newDefaultEventHandler().

    Event definitions can be retrieved through the EventHandlersCatalog. This class is cached by the application in the ConfigurationFilesCache. The following sample code shows how to access it:

     EventHandlersCatalog defns = (EventHandlersCatalog) ConfigurationFilesCache.getConfiguration("/WEB-INF/xml/config/events.xml", EventHandlersCatalog.class);
     
    Those EventHandlers that would like to automatically be initialized using this configuration file, should extend SysEventHandler.

    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Detail

      • getInstance

        public static WebEventHandlerFactory getInstance()
        Deprecated.
        Returns a singleton of this factory. This is entry point to gain access to various WebEventHandler.
        Returns:
        a singleton of WebEventHandlerFactory.
      • newEventHandler

        public WebEventHandler newEventHandler​(int eventHandlerType)
        Deprecated.
        Instantiates a type specific WebEventHandler based on the specified type. The newly created event handler is populated with the default events defined in the SDK level.
        Parameters:
        eventHandlerType - the type of an event handler.
        Returns:
        a type specific WebEventHandler
      • newEventHandler

        public WebEventHandler newEventHandler​(int eventHandlerType,
                                               boolean populate)
        Deprecated.
        Instantiates a type specific WebEventHandler based on the specified type. The boolean parameter populate decides \ Whether to populated the new event handler with the default events defined in the SDK level or not.
        Parameters:
        eventHandlerType - the type of an event handler.
        populate - true if the event handler is populated with the default SDK events.
        Returns:
        a type specific WebEventHandler
      • initEventHandler

        protected WebEventHandler initEventHandler​(int handlerType,
                                                   org.w3c.dom.Element eventsNode)
        Deprecated.
        Initialize a WebEventHandler based on the specified type and XML representation for this factory.
        Specified by:
        initEventHandler in class AbstractEventHandlerFactory
        Parameters:
        handlerType - an event handler type
        eventsNode - a org.w3c.dom.Element object representing an event handler.
        Returns:
        a new type specific WebEventHandler instance