Class ServletEvent

  • All Implemented Interfaces:
    WebEvent, WebEventTags, java.lang.Cloneable

    public class ServletEvent
    extends GenericWebEvent
    Title: ServletEvent. Description: This class extends the GenericWebEvent by providing a target page. This page is configured in the appBeanEvents.xml Company: MicroStrategy
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Constructor Detail

      • ServletEvent

        public ServletEvent()
        Just calls super()
    • Method Detail

      • initFromXML

        @Deprecated
        public boolean initFromXML​(org.w3c.dom.Element node)
        Deprecated.
        The ServletEventHandler is not responsible to read the xml structure.
        Extendes initFromXml by reading a target attribute. If this node doesn't have a target attribute it returns false
        Overrides:
        initFromXML in class GenericWebEvent
        Parameters:
        node - the xmlNode with the event information
        Returns:
        true if the node contains valid information. false otherwise
      • addEventInfo

        public void addEventInfo​(ParameterBuilder paramBldr,
                                 int eventElements,
                                 int howMuchChildState)
        Adds event information into an existing ParameterBuilder instance. It is up to the supplied ParameterBuilder to determine how this information is serialized. Extends addEventInfo by automatically setting the value of the arguments if the Event has been initialized with a RequestKeys.
        If the value of any of the Arguments of this event is found in the request, it will will automatically take that value.
        Parameters:
        paramBldr - The ParameterBuilder instance which has child state information added to it.
        eventElements - A bit mask value composed of constants from EnumEventElement. These determine what elements of the event is added.
        howMuchChildState - If children state is to be added, this parameter (whose values come from EnumWebPersistableState) determines how much state.
        Since:
        MicroStrategy Web 8.0.0
      • getSourcePath

        public java.lang.String getSourcePath()
        Extends getSourcePath by returning the path of the Source element as found in the RequestKeys.
        If the SourcePath has not been specifically set for this event (by calling setSourcePath(), and if this Event has been initialized with a RequestKeys, then the event checks if the RequestKeys contains the URL_SOURCE_NAME and if so return it as the SourcePath.
        Specified by:
        getSourcePath in interface WebEvent
        Overrides:
        getSourcePath in class GenericWebEvent
        Returns:
        the path to the WebComponent source of this event.
      • initFromRequest

        public boolean initFromRequest​(RequestKeys keys)
        Initialize the event with the given request keys
        Parameters:
        keys - the request keys to be used by this event
        Returns:
        true
      • setID

        public void setID​(int id)
        Extends setID by filtering the request keys to use only the event and source of the given event id.
        Specified by:
        setID in interface WebEvent
        Overrides:
        setID in class GenericWebEvent
        Parameters:
        id - an event id to set.
      • setTargetPage

        public void setTargetPage​(java.lang.String page)
        Sets the page the execution will be redirected to when the event is handled
        Parameters:
        page - a valid page name defined in the pageConfig.xml file
      • getTargetPage

        public java.lang.String getTargetPage()
        Returns the page the execution will be redirected to when the event is handled
        Returns:
        String the name of the page. This page should exist in the pageConfig.xml file
      • getRequestKeys

        public RequestKeys getRequestKeys()
        Returns a reference to the RequestKeys associated wih the event
        Returns:
        RequestKeys