Package com.microstrategy.web.beans
Class EventInfo
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.beans.EventInfo
-
- All Implemented Interfaces:
ConfigurationElement
,ConfigurationFile
,java.lang.Cloneable
public class EventInfo extends AbstractConfigurationElement
This class represents the "event" node from the XML. Each event is identified by its id and holds a list of all the arguments associated with the event. Children : The arguments node which holds the list of all the arguments. Attributes: "id" - The event id "name" - The name of the event "target" - The target for the event "event-class" - A fully qualified class name of the concrete WebEvent that should be instantiated for this event. Key : "id" attribute.- Since:
- MicroStrategy Web 9.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
AbstractConfigurationElement.FilteredList
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
ATT_DEPRECATED
protected static java.lang.String
ATT_EVENT_CLASS
protected static java.lang.String
ATT_ID
protected static java.lang.String
ATT_NAME
protected static java.lang.String
ATT_TARGET
protected static java.lang.String
ATT_WINDOW
protected static java.lang.String
NODE_EVENT
-
Fields inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
ATT_CONFIG_SRC, ATT_DELETED, ATT_POSITION, ATT_PROTOTYPE, ATT_USE_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description EventInfo()
Default constructor.EventInfo(int id)
Constructor: Set the id field for the eventEventInfo(int id, java.lang.String name)
Set the id and name for the eventEventInfo(int id, java.lang.String name, java.lang.String target)
Set the id, name and target for the event
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteArgument(int id)
Delete the argument with the given id.EventArgumentInfo
getArgument(int argID)
Return the event argument with the given id from the arguments listEventArgumentInfoList
getArguments()
Return the list of arguments associated with this eventjava.lang.String
getDeprecated()
Returns the deprecated field value.java.lang.String
getEventClass()
Returns the fully qualified class name of the a class that implementsWebEvent
and that should be instantiated when creating concrete WebEvent instances for this EventInfo.int
getID()
Return the id field value.protected java.lang.String
getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKey
andsetKey
methods.java.lang.String
getName()
Returns the name field value.java.lang.String
getTarget()
Returns the target field value.java.lang.String
getWindow()
Returns the window attribute value.EventArgumentInfo
newArgument(int id)
Create a new argument and add it to the arguments list.void
setDeprecated(java.lang.String message)
Sets the deprecated field value.void
setEventClass(java.lang.String value)
Indicates the fully qualified class name of the a class that implementsWebEvent
and that should be instantiated when creating concrete WebEvent instances for this EventInfo.void
setID(int id)
Sets the id field value.void
setName(java.lang.String name)
Sets the name field value.void
setTarget(java.lang.String target)
Set the target field value.void
setWindow(java.lang.String value)
Set the window attribute.-
Methods inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
addFileSource, applyCustomization, applyCustomizations, cleanUpDeletedElements, clone, delete, deltas, deltas, equalAtts, equalElements, equalNodeValues, equals, equalsIncludingDeletedElements, exportAttributesToXML, exportElementsToXML, exportNodeValueToXML, getAttribute, getAttributes, getBoolAttribute, getChildKey, getConfigSrc, getDTDFileName, getElement, getElement, getElements, getFileLoader, getIntAttribute, getIntAttribute, getKey, getLineNumber, getList, getNextKey, getNodeName, getNodeValue, getNodeValue, getOrCreateElement, getParent, getPosition, getPrototype, getRegisteredClass, getSelfInitPath, getSource, getStrAttribute, getUseDefault, getXMLParserParameters, getXMLSerializerParameters, hashCode, hashCodeAtts, hashCodeElements, hashCodeNodeValues, hasRegisteredClass, initAttributesFromXML, initDefaultAttributes, initElementFromXML, initElementsFromXML, initFromFile, initFromResource, initFromXML, initFromXML, initNodeValueFromXML, initPrototype, isActive, isCustomized, isDeleted, isDirty, isInSource, isKeyAttribute, load, mergeChanges, newChildInstance, newSource, original, populate, printAttributes, printElements, printNodeValue, refreshLists, registerClass, registerElement, registerElement, registerElementList, reload, reloadPrototype, removeAttribute, removeDefaults, replaceList, restore, save, save, saveChangesAs, saveConfig, saveFlatXML, saveNode, saveSource, setAttribute, setBoolAttribute, setChildOriginals, setConfigSrc, setCustomized, setElement, setFileLoader, setIntAttribute, setKey, setLineNumber, setNodeName, setNodeValue, setPosition, setPrototype, setSelfInitPath, setStrAttribute, setUseDefault, setUseValidation, throwConfigParseException, toString, toXML, toXML, toXML, toXML, useNodeValue, useValidation
-
-
-
-
Field Detail
-
NODE_EVENT
protected static final java.lang.String NODE_EVENT
- See Also:
- Constant Field Values
-
ATT_ID
protected static final java.lang.String ATT_ID
- See Also:
- Constant Field Values
-
ATT_NAME
protected static final java.lang.String ATT_NAME
- See Also:
- Constant Field Values
-
ATT_TARGET
protected static final java.lang.String ATT_TARGET
- See Also:
- Constant Field Values
-
ATT_WINDOW
protected static final java.lang.String ATT_WINDOW
- See Also:
- Constant Field Values
-
ATT_DEPRECATED
protected static final java.lang.String ATT_DEPRECATED
- See Also:
- Constant Field Values
-
ATT_EVENT_CLASS
protected static final java.lang.String ATT_EVENT_CLASS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EventInfo
public EventInfo()
Default constructor. Set the node name and register the child element
-
EventInfo
public EventInfo(int id)
Constructor: Set the id field for the event- Parameters:
id
- The event "id" for this object
-
EventInfo
public EventInfo(int id, java.lang.String name)
Set the id and name for the event- Parameters:
id
- The event "id" for this objectname
- The event "name" for this object
-
EventInfo
public EventInfo(int id, java.lang.String name, java.lang.String target)
Set the id, name and target for the event- Parameters:
id
- The event "id" for this objectname
- The event "name" for this objecttarget
- The event "target" for this object
-
-
Method Detail
-
getKeyAttribute
protected java.lang.String getKeyAttribute()
Description copied from class:AbstractConfigurationElement
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKey
andsetKey
methods.- Specified by:
getKeyAttribute
in classAbstractConfigurationElement
-
getID
public int getID()
Return the id field value. The id uniquely identifies the event across the application.- Returns:
- The "id" associated with this event
-
setID
public void setID(int id)
Sets the id field value. The id most be unique across the application.- Parameters:
id
- The new value for the "id" attribute
-
getName
public java.lang.String getName()
Returns the name field value. The name can be used to identify the action associated with the event- Returns:
- The "name" associated with this event
-
setName
public void setName(java.lang.String name)
Sets the name field value. Set the name to identify the action associated with this event.- Parameters:
name
- The new value for the "name" attribute
-
getTarget
public java.lang.String getTarget()
Returns the target field value. The target indicates the bean (if other than the source bean) who should handle the request for this event.- Returns:
- The "target" associated with this event
-
setTarget
public void setTarget(java.lang.String target)
Set the target field value. The target indicates the bean (if other than the source bean) who should handle the request for this event.- Parameters:
target
- The new value for the "target" attribute
-
getWindow
public java.lang.String getWindow()
Returns the window attribute value. The window identifies the browser's window name where the event should be open when triggered.
-
setWindow
public void setWindow(java.lang.String value)
Set the window attribute. The window identifies the browser's window name where the event should be open when triggered. To always open in a new window, use "_blank"; if no value is specified it opens in the current window.
-
setDeprecated
public void setDeprecated(java.lang.String message)
Sets the deprecated field value. When an event is marked as deprecated and the events is used, the deprecated message is log as a warning. The event will still be executed.- Parameters:
message
- The message to display indicating the event has been deprecated.
-
getDeprecated
public java.lang.String getDeprecated()
Returns the deprecated field value. When an event is marked as deprecated and the events is used, the deprecated message is log as a warning. The event will still be executed. If the event is not deprecated, this method returnsnull
-
setEventClass
public void setEventClass(java.lang.String value)
Indicates the fully qualified class name of the a class that implementsWebEvent
and that should be instantiated when creating concrete WebEvent instances for this EventInfo.
-
getEventClass
public java.lang.String getEventClass()
Returns the fully qualified class name of the a class that implementsWebEvent
and that should be instantiated when creating concrete WebEvent instances for this EventInfo. If an event-class is not specified, is up to the EventHandler to decide what class to use (typicallyGenericWebEvent
).
-
getArgument
public EventArgumentInfo getArgument(int argID)
Return the event argument with the given id from the arguments list- Parameters:
argID
- The id for the argument to be returned- Returns:
- The event argument with the given id
-
deleteArgument
public void deleteArgument(int id)
Delete the argument with the given id. This is a shortcut to EventArgumentInfoList#deleteArgument()- Parameters:
id
- The id of the argument to be deleted
-
newArgument
public EventArgumentInfo newArgument(int id)
Create a new argument and add it to the arguments list. This is a shortcut method to EventArgumentInfoList#newArgument()- Parameters:
id
- The id (key) for the new argument to be created- Returns:
- The new argument created and added to the list with the given id
-
getArguments
public EventArgumentInfoList getArguments()
Return the list of arguments associated with this event- Returns:
- The arguments list for this event
-
-