public class

EventInfo

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.beans.EventInfo

Class Overview

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.

Summary

Constants
String ATT_DEPRECATED
String ATT_EVENT_CLASS
String ATT_ID
String ATT_NAME
String ATT_TARGET
String ATT_WINDOW
String NODE_EVENT
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
EventInfo()
Default constructor.
EventInfo(int id)
Constructor: Set the id field for the event
EventInfo(int id, String name)
Set the id and name for the event
EventInfo(int id, String name, String target)
Set the id, name and target for the event
Public Methods
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 list
EventArgumentInfoList getArguments()
Return the list of arguments associated with this event
String getDeprecated()
Returns the deprecated field value.
String getEventClass()
Returns the fully qualified class name of the a class that implements WebEvent and that should be instantiated when creating concrete WebEvent instances for this EventInfo.
int getID()
Return the id field value.
String getName()
Returns the name field value.
String getTarget()
Returns the target field value.
String getWindow()
Returns the window attribute value.
EventArgumentInfo newArgument(int id)
Create a new argument and add it to the arguments list.
void setDeprecated(String message)
Sets the deprecated field value.
void setEventClass(String value)
Indicates the fully qualified class name of the a class that implements WebEvent and that should be instantiated when creating concrete WebEvent instances for this EventInfo.
void setID(int id)
Sets the id field value.
void setName(String name)
Sets the name field value.
void setTarget(String target)
Set the target field value.
void setWindow(String value)
Set the window attribute.
Protected Methods
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 the getKey and setKey methods.
[Expand]
Inherited Methods
From class com.microstrategy.utils.config.AbstractConfigurationElement
From class java.lang.Object
From interface com.microstrategy.utils.config.ConfigurationElement
From interface com.microstrategy.utils.config.ConfigurationFile

Constants

protected static final String ATT_DEPRECATED

Constant Value: "deprecated"

protected static final String ATT_EVENT_CLASS

Constant Value: "event-class"

protected static final String ATT_ID

Constant Value: "id"

protected static final String ATT_NAME

Constant Value: "name"

protected static final String ATT_TARGET

Constant Value: "target"

protected static final String ATT_WINDOW

Constant Value: "window"

protected static final String NODE_EVENT

Constant Value: "event"

Public Constructors

public EventInfo ()

Default constructor. Set the node name and register the child element

public EventInfo (int id)

Constructor: Set the id field for the event

Parameters
id The event "id" for this object

public EventInfo (int id, String name)

Set the id and name for the event

Parameters
id The event "id" for this object
name The event "name" for this object

public EventInfo (int id, String name, String target)

Set the id, name and target for the event

Parameters
id The event "id" for this object
name The event "name" for this object
target The event "target" for this object

Public Methods

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

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

public EventArgumentInfoList getArguments ()

Return the list of arguments associated with this event

Returns
  • The arguments list for this event

public 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 returns null

public String getEventClass ()

Returns the fully qualified class name of the a class that implements WebEvent 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 (typically GenericWebEvent).

public int getID ()

Return the id field value. The id uniquely identifies the event across the application.

Returns
  • The "id" associated with this event

public 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

public 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

public String getWindow ()

Returns the window attribute value. The window identifies the browser's window name where the event should be open when triggered.

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

public void setDeprecated (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.

public void setEventClass (String value)

Indicates the fully qualified class name of the a class that implements WebEvent and that should be instantiated when creating concrete WebEvent instances for this EventInfo.

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

public void setName (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

public void setTarget (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

public void setWindow (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.

Protected Methods

protected 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 the getKey and setKey methods.