public class

ShortcutEvent

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.app.ShortcutEvent

Class Overview

Defines either an event to be executed when the user clicks on the parent shortcut link or an update action to be performed on the shortcut when the event is handled by the application.

Summary

Constants
String ATT_ACTION
String ATT_BASE_BEAN
String ATT_EVENT_ID
String ATT_FEATURE_ID
String ATT_STATE
String ATT_STATE_LEVEL
String ATT_XMLMERGE_ID
String NODE_EVENT
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
ShortcutEvent()
Class constructor
ShortcutEvent(String xml)
Class constructor.
ShortcutEvent(Node root)
Class constructor.
ShortcutEvent(Document doc)
Class constructor.
Public Methods
void addShortcutArgument(ShortcutArgument arg)
String getAction()
Defines how to update the shortcut information on an iframe partial page update request.
String getBaseBean()
REturns the bean from the pages bean hierarchy associated with the event.
AbstractConfigurationElement.FilteredList getEventArgumentList()
Returns a list of arguments for this event.
HashList getEventArguments()
This method is deprecated. Use getEventArgumentList()
String getEventId()
Returns the event id associated with the element.
String getFeatureID()
Returns a feature that is evaluated to determine whether the event is associated with the shortcut.
Object getKey()
Default implementation for getKey().
String getState()
Returns that state at which the shortcut should use this event.
int getStateLevel()
Returns the level of the page's state (minimum, typical or maximum) that is added to the shortcut when the event is invoked.
String getXmlMergeId()
A unique identifier of this element, used oly when the event-id cannot be used as unique identifier (for example, when the shortcut requires multiple event nodes with the same event-id, each one with different actions or arguments).
void setAction(String value)
Defines how to update the shortcut information on an iframe partial page update request.
void setBaseBean(String baseBean)
Indicates the bean from the pages bean hierarchy associated with the event.
void setEventId(String eventId)
Indicates the application event id associated with the element.
void setFeatureID(String featureID)
Represents a feature that is evaluated to determine whether the event is associated with the shortcut.
void setState(String state)
Indicates that the event is used by the Shortcut only when the state of the Shortcut matches the value of this attribute.
void setStateLevel(int stateLevel)
Defines the level of the page's state (minimum, typical or maximum) that is added to the shortcut when the event is invoked.
void setXmlMergeId(String xmlMergeId)
Sets the XMLmerge_id attribute, a unique identifier of this element when the event-id cannot be used as unique identifier (for example, when the shortcuts requires multiple event nodes with the same event-id, each one with different actions or arguments).
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.
void initDefaultAttributes()
This method can be overridden to set default values for attributes.
boolean isKeyAttribute(String name)
Returns true is the name is that of the key attribute.
void setKey(Element element)
Default implementation for setKey().
[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

public static final String ATT_ACTION

Constant Value: "action"

public static final String ATT_BASE_BEAN

Constant Value: "base-bean"

public static final String ATT_EVENT_ID

Constant Value: "event-id"

public static final String ATT_FEATURE_ID

Constant Value: "feature-id"

public static final String ATT_STATE

Constant Value: "state"

public static final String ATT_STATE_LEVEL

Constant Value: "state-level"

public static final String ATT_XMLMERGE_ID

Constant Value: "XMLmerge_id"

public static final String NODE_EVENT

Constant Value: "event"

Public Constructors

public ShortcutEvent ()

Class constructor

public ShortcutEvent (String xml)

Class constructor. Creates a new instance of the DynamicLinkEvent, initializing it with the information provided on an xml string.

Parameters
xml Xml String to use for initializing the object.

public ShortcutEvent (Node root)

Class constructor. Creates a new instance of the DynamicLinkEvent, initializing it with the information provided on an xml Node.

Parameters
root Node instance representing the different pages information.

public ShortcutEvent (Document doc)

Class constructor. Creates a new instance of the DynamicLinkEvent, initializing it with the information provided on an xml Document.

Parameters
doc DOM Document with information to initialize this class

Public Methods

public void addShortcutArgument (ShortcutArgument arg)

public String getAction ()

Defines how to update the shortcut information on an iframe partial page update request. When this event is handled by the application, the parent of this ShortcutEvent will be updated based on the action value as follows:

  • check: The shortcut is checked.
  • uncheck: The shortcut is unchecked.
  • enable: The shortcut becomes enabled.
  • disabled: The shortcut becomes disabled.
  • refresh: The shortcut is refreshed entirely, including not only its status but also links and text.

public String getBaseBean ()

REturns the bean from the pages bean hierarchy associated with the event. This bean is used in tasks such as resolving features. (If this attribute is not set, the application tries to use the base-bean attribute for the element.)

public AbstractConfigurationElement.FilteredList getEventArgumentList ()

Returns a list of arguments for this event.

public HashList getEventArguments ()

This method is deprecated.
Use getEventArgumentList()

Get the list of event arguments

Returns
  • arguments list of arguments associated with this link

public String getEventId ()

Returns the event id associated with the element.

Returns
  • eventId eventID associated with this link

public String getFeatureID ()

Returns a feature that is evaluated to determine whether the event is associated with the shortcut. If the feature is disabled, the event is not associated with the shortcut and the next event on the list is tried. The application uses the first event whose feature is enabled.

public Object getKey ()

Default implementation for getKey(). It assumes a single attribute can be used to uniquely identify this element among its siblings; the attribute to use is specified by the getKeyAttribute() method.

Returns
  • If getKeyAttribute() is empty returns null, otherwise it returns the value of the given attribute.

public String getState ()

Returns that state at which the shortcut should use this event. Possible values are "checked", "unchecked" and "hidden".

public int getStateLevel ()

Returns the level of the page's state (minimum, typical or maximum) that is added to the shortcut when the event is invoked. This state is used to restore the beans information on a new request.

public String getXmlMergeId ()

A unique identifier of this element, used oly when the event-id cannot be used as unique identifier (for example, when the shortcut requires multiple event nodes with the same event-id, each one with different actions or arguments).

public void setAction (String value)

Defines how to update the shortcut information on an iframe partial page update request. When this event is handled by the application, the parent of this ShortcutEvent will be updated based on the action value as follows:

  • check: The shortcut is checked.
  • uncheck: The shortcut is unchecked.
  • enable: The shortcut becomes enabled.
  • disabled: The shortcut becomes disabled.
  • refresh: The shortcut is refreshed entirely, including not only its status but also links and text.

Parameters
value String

public void setBaseBean (String baseBean)

Indicates the bean from the pages bean hierarchy associated with the event. This bean is used in tasks such as resolving features. (If this attribute is not set, the application tries to use the base-bean attribute for the element.)

public void setEventId (String eventId)

Indicates the application event id associated with the element.

Parameters
eventId eventID associated with this link

public void setFeatureID (String featureID)

Represents a feature that is evaluated to determine whether the event is associated with the shortcut. If the feature is disabled, the event is not associated with the shortcut and the next event on the list is tried.

public void setState (String state)

Indicates that the event is used by the Shortcut only when the state of the Shortcut matches the value of this attribute.

Parameters
state state to associate with this link, either "hidden", "checked" or "unchecked".

public void setStateLevel (int stateLevel)

Defines the level of the page's state (minimum, typical or maximum) that is added to the shortcut when the event is invoked. This state is used to restore the beans information on a new request. Possible values are the fully-qualified names of the EnumWebPersistableState enumeration

public void setXmlMergeId (String xmlMergeId)

Sets the XMLmerge_id attribute, a unique identifier of this element when the event-id cannot be used as unique identifier (for example, when the shortcuts requires multiple event nodes with the same event-id, each one with different actions or arguments).

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.

protected void initDefaultAttributes ()

This method can be overridden to set default values for attributes. Simply extend this method and call setAttribute(String, Object)

protected boolean isKeyAttribute (String name)

Returns true is the name is that of the key attribute.

protected void setKey (Element element)

Default implementation for setKey(). It assumes a single attribute can be used to uniquely identify this element among its siblings and adds this attribute to the given element; the attribute to use is specified by the getKeyAttribute() method.