Package com.microstrategy.web.app
Class ShortcutEvent
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.app.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
AbstractConfigurationElement.FilteredList
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATT_ACTION
static java.lang.String
ATT_BASE_BEAN
static java.lang.String
ATT_EVENT_ID
static java.lang.String
ATT_FEATURE_ID
static java.lang.String
ATT_STATE
static java.lang.String
ATT_STATE_LEVEL
static java.lang.String
ATT_XMLMERGE_ID
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 ShortcutEvent()
Class constructorShortcutEvent(java.lang.String xml)
Class constructor.ShortcutEvent(org.w3c.dom.Document doc)
Class constructor.ShortcutEvent(org.w3c.dom.Node root)
Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addShortcutArgument(ShortcutArgument arg)
java.lang.String
getAction()
Defines how to update the shortcut information on an iframe partial page update request.java.lang.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()
Deprecated.java.lang.String
getEventId()
Returns the event id associated with the element.java.lang.String
getFeatureID()
Returns a feature that is evaluated to determine whether the event is associated with the shortcut.java.lang.Object
getKey()
Default implementation forgetKey()
.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
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.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).protected void
initDefaultAttributes()
This method can be overridden to set default values for attributes.protected boolean
isKeyAttribute(java.lang.String name)
Returnstrue
is the name is that of the key attribute.void
setAction(java.lang.String value)
Defines how to update the shortcut information on an iframe partial page update request.void
setBaseBean(java.lang.String baseBean)
Indicates the bean from the pages bean hierarchy associated with the event.void
setEventId(java.lang.String eventId)
Indicates the application event id associated with the element.void
setFeatureID(java.lang.String featureID)
Represents a feature that is evaluated to determine whether the event is associated with the shortcut.protected void
setKey(org.w3c.dom.Element element)
Default implementation forsetKey()
.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.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(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).-
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, getLineNumber, getList, getNextKey, getNodeName, getNodeValue, getNodeValue, getOrCreateElement, getParent, getPosition, getPrototype, getRegisteredClass, getSelfInitPath, getSource, getStrAttribute, getUseDefault, getXMLParserParameters, getXMLSerializerParameters, hashCode, hashCodeAtts, hashCodeElements, hashCodeNodeValues, hasRegisteredClass, initAttributesFromXML, initElementFromXML, initElementsFromXML, initFromFile, initFromResource, initFromXML, initFromXML, initNodeValueFromXML, initPrototype, isActive, isCustomized, isDeleted, isDirty, isInSource, 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, setLineNumber, setNodeName, setNodeValue, setPosition, setPrototype, setSelfInitPath, setStrAttribute, setUseDefault, setUseValidation, throwConfigParseException, toString, toXML, toXML, toXML, toXML, useNodeValue, useValidation
-
-
-
-
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
- XmlString
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
-
initDefaultAttributes
protected void initDefaultAttributes()
Description copied from class:AbstractConfigurationElement
This method can be overridden to set default values for attributes. Simply extend this method and callAbstractConfigurationElement.setAttribute(java.lang.String, java.lang.Object)
- Overrides:
initDefaultAttributes
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
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 theelement.)
-
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 theEnumWebPersistableState
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 theelement.)
-
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
public HashList getEventArguments()
Deprecated.Get the list of event arguments- Returns:
- arguments list of arguments associated with this link
-
getEventArgumentList
public AbstractConfigurationElement.FilteredList getEventArgumentList()
Returns a list of arguments for this event.- Since:
- MicroStrategy Web 9.0.0
-
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 thegetKey
andsetKey
methods.- Specified by:
getKeyAttribute
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
getKey
public java.lang.Object getKey()
Description copied from class:AbstractConfigurationElement
Default implementation forgetKey()
. It assumes a single attribute can be used to uniquely identify this element among its siblings; the attribute to use is specified by thegetKeyAttribute()
method.- Specified by:
getKey
in interfaceConfigurationElement
- Overrides:
getKey
in classAbstractConfigurationElement
- Returns:
- If
getKeyAttribute()
is empty returnsnull
, 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 forsetKey()
. 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 thegetKeyAttribute()
method.- Overrides:
setKey
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
isKeyAttribute
protected boolean isKeyAttribute(java.lang.String name)
Description copied from class:AbstractConfigurationElement
Returnstrue
is the name is that of the key attribute.- Overrides:
isKeyAttribute
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
-