Package com.microstrategy.web.app.beans
Class ServletEvent
- java.lang.Object
-
- com.microstrategy.web.beans.GenericWebEvent
-
- com.microstrategy.web.app.beans.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
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.beans.GenericWebEvent
URL_DEFAULT_EVENT_LIST, URL_EVENT_NAME, URL_EVENT_ORDER_NAME, URL_SOURCE_NAME
-
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 Constructor Description ServletEvent()
Just calls super()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addEventInfo(ParameterBuilder paramBldr, int eventElements, int howMuchChildState)
Adds event information into an existingParameterBuilder
instance.RequestKeys
getRequestKeys()
Returns a reference to theRequestKeys
associated wih the eventjava.lang.String
getSourcePath()
Extends getSourcePath by returning the path of the Source element as found in the RequestKeys.java.lang.String
getTargetPage()
Returns the page the execution will be redirected to when the event is handledprotected void
init(EventInfo info)
boolean
initFromRequest(RequestKeys keys)
Initialize the event with the given request keysboolean
initFromXML(org.w3c.dom.Element node)
Deprecated.The ServletEventHandler is not responsible to read the xml structure.void
setID(int id)
Extends setID by filtering the request keys to use only the event and source of the given event id.void
setTargetPage(java.lang.String page)
Sets the page the execution will be redirected to when the event is handled-
Methods inherited from class com.microstrategy.web.beans.GenericWebEvent
areAllBitsSet, clone, getArgumentName, getArgumentName, getArguments, getArgumentValue, getArgumentValue, getArgumentValueCount, getDeprecatedMessage, getFlatState, getHandlerType, getHiddenInputs, getID, getName, getSource, getTargetWindow, getURLLink, getURLLink, getURLParameters, getURLParameters, getURLParameters, initFromKeys, initFromXML, isAnyBitSet, putArgument, putArgument, putArgument, setArgumentValue, setArgumentValue, setDeprecationMessage, setHandlerType, setName, setSource, setSourcePath, setTargetWindow, toString, validateRequiredArguments
-
-
-
-
Method Detail
-
init
protected void init(EventInfo info)
- Overrides:
init
in classGenericWebEvent
- Since:
- MicroStrategy Web 9.0.0
-
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 classGenericWebEvent
- 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 existingParameterBuilder
instance. It is up to the suppliedParameterBuilder
to determine how this information is serialized. ExtendsaddEventInfo
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
- TheParameterBuilder
instance which has child state information added to it.eventElements
- A bit mask value composed of constants fromEnumEventElement
. These determine what elements of the event is added.howMuchChildState
- If children state is to be added, this parameter (whose values come fromEnumWebPersistableState
) 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 callingsetSourcePath()
, and if this Event has been initialized with a RequestKeys, then the event checks if the RequestKeys contains theURL_SOURCE_NAME
and if so return it as the SourcePath.- Specified by:
getSourcePath
in interfaceWebEvent
- Overrides:
getSourcePath
in classGenericWebEvent
- 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 interfaceWebEvent
- Overrides:
setID
in classGenericWebEvent
- 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 theRequestKeys
associated wih the event- Returns:
- RequestKeys
-
-