Class ShortcutEvent

  • All Implemented Interfaces:
    ConfigurationElement, ConfigurationFile, java.lang.Cloneable

    public class ShortcutEvent
    extends AbstractConfigurationElement
    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.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Detail

      • NODE_EVENT

        public static final java.lang.String NODE_EVENT
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • ATT_BASE_BEAN

        public static final java.lang.String ATT_BASE_BEAN
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • ATT_ACTION

        public static final java.lang.String ATT_ACTION
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • ATT_FEATURE_ID

        public static final java.lang.String ATT_FEATURE_ID
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • ATT_STATE_LEVEL

        public static final java.lang.String ATT_STATE_LEVEL
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • ATT_STATE

        public static final java.lang.String ATT_STATE
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • ATT_XMLMERGE_ID

        public static final java.lang.String ATT_XMLMERGE_ID
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • ATT_EVENT_ID

        public static final java.lang.String ATT_EVENT_ID
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
    • Constructor Detail

      • ShortcutEvent

        public ShortcutEvent()
        Class constructor
      • ShortcutEvent

        public ShortcutEvent​(java.lang.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.
      • ShortcutEvent

        public ShortcutEvent​(org.w3c.dom.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.
      • ShortcutEvent

        public ShortcutEvent​(org.w3c.dom.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
    • Method Detail

      • setEventId

        public void setEventId​(java.lang.String eventId)
        Indicates the application event id associated with the element.
        Parameters:
        eventId - eventID associated with this link
      • setXmlMergeId

        public void setXmlMergeId​(java.lang.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).
        Since:
        MicroStrategy Web 7.5.2
      • setBaseBean

        public void setBaseBean​(java.lang.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.)
      • setState

        public void setState​(java.lang.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".
      • setStateLevel

        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
      • setFeatureID

        public void setFeatureID​(java.lang.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.
      • getEventId

        public java.lang.String getEventId()
        Returns the event id associated with the element.
        Returns:
        eventId eventID associated with this link
      • getXmlMergeId

        public java.lang.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).
        Since:
        MicroStrategy Web 7.5.2
      • getBaseBean

        public java.lang.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.)
      • getState

        public java.lang.String getState()
        Returns that state at which the shortcut should use this event. Possible values are "checked", "unchecked" and "hidden".
      • getStateLevel

        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.
      • getFeatureID

        public java.lang.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.
      • getEventArguments

        @Deprecated
        public HashList getEventArguments()
        Deprecated.
        Get the list of event arguments
        Returns:
        arguments list of arguments associated with this link
      • addShortcutArgument

        public void addShortcutArgument​(ShortcutArgument arg)
        Since:
        MicroStrategy Web 9.0.0
      • setAction

        public void setAction​(java.lang.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
      • getAction

        public java.lang.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.
      • 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 the getKey and setKey methods.
        Specified by:
        getKeyAttribute in class AbstractConfigurationElement
        Since:
        MicroStrategy Web 9.0.0
      • getKey

        public java.lang.Object getKey()
        Description copied from class: AbstractConfigurationElement
        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.
        Specified by:
        getKey in interface ConfigurationElement
        Overrides:
        getKey in class AbstractConfigurationElement
        Returns:
        If getKeyAttribute() is empty returns null, otherwise it returns the value of the given attribute.
        Since:
        MicroStrategy Web 9.0.0
      • setKey

        protected void setKey​(org.w3c.dom.Element element)
        Description copied from class: AbstractConfigurationElement
        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.
        Overrides:
        setKey in class AbstractConfigurationElement
        Since:
        MicroStrategy Web 9.0.0