Package com.microstrategy.web.beans
Class AbstractEventHandlerFactory
- java.lang.Object
-
- com.microstrategy.web.beans.AbstractEventHandlerFactory
-
- All Implemented Interfaces:
WebEventTags
- Direct Known Subclasses:
AppEventHandlerFactory
,WebEventHandlerFactory
@Deprecated public abstract class AbstractEventHandlerFactory extends java.lang.Object implements WebEventTags
Deprecated.Event-handlers factories are not used. The bean itself now is responsible to define and create instances of its default event-handler.This abstract class provides common functionalities for theWebEventHandlerFactory
interface.- Since:
- MicroStrategy Web 7.3.1 or earlier
- See Also:
WebEventHandlerFactory
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.web.beans.WebEventTags
ATT_ARGUMENT_ENUMERATOR, ATT_ARGUMENT_ID, ATT_ARGUMENT_INDEX, ATT_ARGUMENT_NAME, ATT_ARGUMENT_REQUIRED, ATT_ARGUMENT_TYPE, ATT_ARGUMENT_VALIDATOR, ATT_ARGUMENT_VALUE, ATT_EVENT_DEPRECATED, ATT_EVENT_ENUMERATOR, ATT_EVENT_HANDLER_ENUMERATOR, ATT_EVENT_HANDLER_NAME, ATT_EVENT_HANDLER_TYPE, ATT_EVENT_ID, ATT_EVENT_NAME, ATT_EVENT_TARGET, TAG_ARGUMENT, TAG_ARGUMENTS, TAG_EVENT, TAG_EVENT_HANDLER, TAG_EVENT_HANDLERS, TAG_EVENTS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEventHandlerFactory()
Deprecated.Default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addEventsToHandlers(java.io.File file)
Deprecated.The parsing logic in this abstract factory would be as follows: It gets a reference to the specific handler that is referred to in the definition.void
addEventsToHandlers(org.w3c.dom.Document handlerDoc)
Deprecated.The parsing logic in this abstract factory would be as follows: It gets a reference to the specific handler that is referred to in the definition.void
destroy()
Deprecated.Destroy the HashSet and other caches, will be called when destroying the sevletprotected WebEventHandler
getEventHandler(int handlerType)
Deprecated.Returns aWebEventHandler
instance of the specified type from the factory.protected abstract WebEventHandler
initEventHandler(int handlerType, org.w3c.dom.Element eventsNode)
Deprecated.Instantiates and returns aWebEventHandler
object based on the specified type andorg.w3c.dom.Element
object.protected void
initEventHandlers(org.w3c.dom.Document handlerDoc)
Deprecated.Initializes the event handler factory from the specifiedorg.w3c.dom.Document
object.protected void
setEventHandler(int handlerType, WebEventHandler weh)
Deprecated.adds or replaces an instance ofWebEventHandler
into the factory.
-
-
-
Method Detail
-
initEventHandlers
protected void initEventHandlers(org.w3c.dom.Document handlerDoc)
Deprecated.Initializes the event handler factory from the specifiedorg.w3c.dom.Document
object. All event handlers defined in theDocument
object are cached in the factory.Any existing event handler with the same type is replaced by the newly added event handler.
- Parameters:
handlerDoc
- aorg.w3c.dom.Document
object containing all the event handlers supported by your application. The root node ofDocument
object should beWebEventTags.TAG_EVENT_HANDLERS
.
-
initEventHandler
protected abstract WebEventHandler initEventHandler(int handlerType, org.w3c.dom.Element eventsNode)
Deprecated.Instantiates and returns aWebEventHandler
object based on the specified type andorg.w3c.dom.Element
object.- Parameters:
handlerType
- the event handler typeeventsNode
- aorg.w3c.dom.Element
object containing the definition of the event handler of the specified type.- Returns:
- an instance of
WebEventHandler
of the specified type.
-
getEventHandler
protected WebEventHandler getEventHandler(int handlerType)
Deprecated.Returns aWebEventHandler
instance of the specified type from the factory.- Parameters:
handlerType
- the event handler type.- Returns:
- a
WebEventHandler
instance of the specified type
-
setEventHandler
protected void setEventHandler(int handlerType, WebEventHandler weh)
Deprecated.adds or replaces an instance ofWebEventHandler
into the factory.- Parameters:
handlerType
- the type of the event handler to addweh
- an instance ofWebEventHandler
.
-
addEventsToHandlers
public void addEventsToHandlers(java.io.File file) throws WebBeanException
Deprecated.The parsing logic in this abstract factory would be as follows: It gets a reference to the specific handler that is referred to in the definition. If there is no pre-defined handler of that type, ignore that type Otherwise call addEvents(Element) on the handler. The handler now needs to check if this an event that is already defined. If so, get a reference to that event. If not, just add it. It has to check if any of the arguments are already defined. If they are, get reference to the existing argument and overwrite values. If not, add the new argument and set values.- Parameters:
file
- a file reference to the definition of the events- Throws:
WebBeanException
- thrown if there is any error
-
addEventsToHandlers
public void addEventsToHandlers(org.w3c.dom.Document handlerDoc)
Deprecated.The parsing logic in this abstract factory would be as follows: It gets a reference to the specific handler that is referred to in the definition. If there is no pre-defined handler of that type, ignore that type Otherwise call addEvents(Element) on the handler The handler now needs to check if this an event that is already defined. If so, get a reference to that event. If not, just add it. It has to check if any of the arguments are already defined. If they are, get reference to the existing argument and overwrite values. If not, add the new argument and set values.- Parameters:
handlerDoc
- a DOM Document object of the event definitions
-
destroy
public void destroy()
Deprecated.Destroy the HashSet and other caches, will be called when destroying the sevlet
-
-