Class AppEventHandlerFactory

  • All Implemented Interfaces:
    WebEventTags

    @Deprecated
    public final class AppEventHandlerFactory
    extends AbstractEventHandlerFactory
    Deprecated.
    This factory is not used. The bean itself now is responsible to define and create instances of its default event-handler.

    This class is responsible for handing out instances of specific event handlers identified by the type (as defined in EnumSysBeanTypes).

    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

      • newEventHandler

        public WebEventHandler newEventHandler​(int appBeanType)
        Deprecated.
        Return a new instance of the specific event handler identified by the type. The instance returned is not populated with any events. It is the caller's responsiblity to later initialize the list of events.
        Parameters:
        appBeanType - element of the EnumSysBeanTypes enumeration identifying the type of app bean
        Returns:
        a WebEventHandler object for the bean requested
      • newEventHandler

        public WebEventHandler newEventHandler​(int eventHandlerType,
                                               boolean populate)
        Deprecated.
        Return a new instance of the specific event handler identified by the type.
        Parameters:
        eventHandlerType - element of the EnumSysBeanTypes enumeration identifying the type of app bean for which an event handler will be created
        populate - boolean indicating if the instance will be populated with its list of events or not. If not, it is the caller's responsiblity to later do it.
        Returns:
        a WebEventHandler object for the bean requested
      • initEventHandler

        protected WebEventHandler initEventHandler​(int handlerType,
                                                   org.w3c.dom.Element eventsNode)
        Deprecated.
        Create an instance of WebEventHandler based on the handler type and initialize it with the event node sent in as argument
        Specified by:
        initEventHandler in class AbstractEventHandlerFactory
        Parameters:
        handlerType - int value of the EnumSysBeanTypes enumeration indicating which type of event handler to create
        eventsNode - Element instance with the event information to use for initializing the handler instance
        Returns:
        WebEventHandler instance initialized.