public class

ShortcutArgument

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

Class Overview

The Shortcut class encapsulates information that can be displayed as option or shortcut for a given page.

Summary

Constants
String ATT_BASE_BEAN
String ATT_ENUMNAME
String ATT_NAME
String ATT_SOURCE
String ATT_SYS_BEAN
String ATT_VALUE
String NODE_ARGUMENT the constant for the shortcut argument
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
ShortcutArgument()
Class constructor.
ShortcutArgument(String name, String value)
Class constructor.
ShortcutArgument(String name, String value, String baseBean, String sysBean)
Class constructor.
ShortcutArgument(String name, String source, String enumname)
Class constructor.
ShortcutArgument(Node root)
Class constructor.
Public Methods
String getBaseBean()
get the base bean name associated with the argument
String getEnumName()
if the value of the argument is taken from an enumerations value, it represents the fully-qualified name of such a value.
String getName()
Get the name of the Shortcut instance
String getSource()
Indicates how to calculate the runtime value of the argument.
String getSysBean()
Returns the fully-qualified name of the beans class to which the base bean is cast when the value of the argument comes from a method name of the base bean.
String getValue()
Returns the value of this argument as stored in the configuration file.
String resolveValue()
Returns the runtime value of the argument.
void setBaseBean(String value)
Sets the baseBean name associated with the argument
void setEnumName(String value)
if the value of the argument is taken from an enumerations value, it represents the fully-qualified name of such a value.
void setName(String name)
Set the name of the Shortcut instance
void setSource(String value)
Indicates how to calculate the runtime value of the argument.
void setSysBean(String value)
Represents the fully-qualified name of the interface to which the base bean is cast when the value of the argument comes from a method name of the base bean.
void setValue(String value)
Sets the value of the argument.
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

public static final String ATT_BASE_BEAN

Constant Value: "base-bean"

public static final String ATT_ENUMNAME

Constant Value: "enumname"

public static final String ATT_NAME

Constant Value: "name"

public static final String ATT_SOURCE

Constant Value: "source"

public static final String ATT_SYS_BEAN

Constant Value: "sys-bean"

public static final String ATT_VALUE

Constant Value: "value"

public static final String NODE_ARGUMENT

the constant for the shortcut argument

Constant Value: "argument"

Public Constructors

public ShortcutArgument ()

Class constructor. Initializes a new -empty- instance of the ShortcutArgument class.

public ShortcutArgument (String name, String value)

Class constructor. Initializes a new instance of the Shortcut class with the information given as parameters

Parameters
name unique name -identifier- for the shortcut argument.
value .Value of the shortcut argument.

public ShortcutArgument (String name, String value, String baseBean, String sysBean)

Class constructor. Initializes a new instance of the Shortcut class with the information given as parameters

Parameters
name unique name -identifier- for the shortcut argument.
value . Value of the shortcut argument.
baseBean . Base bean from which the argument value is to be taken.
sysBean . Sys Bean Name of the Base bean from which the argument value is to be taken.

public ShortcutArgument (String name, String source, String enumname)

Class constructor. Initializes a new instance of the Shortcut class with the information given as parameters

Parameters
name unique name -identifier- for the shortcut argument.
source . Source of the value. It can be constant or enumeration as of now.
enumname . Name of the Enumeration for the value.

public ShortcutArgument (Node root)

Class constructor. Initializes a Shortcut instance based on the information included on the XML Node

Parameters
root Node instance representing the Shortcut information.

Public Methods

public String getBaseBean ()

get the base bean name associated with the argument

Returns
  • the baseBean name associated with the argument

public String getEnumName ()

if the value of the argument is taken from an enumerations value, it represents the fully-qualified name of such a value.

public String getName ()

Get the name of the Shortcut instance

Returns
  • the String value of the name property.

public String getSource ()

Indicates how to calculate the runtime value of the argument.

public String getSysBean ()

Returns the fully-qualified name of the beans class to which the base bean is cast when the value of the argument comes from a method name of the base bean.

public String getValue ()

Returns the value of this argument as stored in the configuration file. If you need the value of the argument as resolved at runtime, use the resolveValue() method.

public String resolveValue ()

Returns the runtime value of the argument. This is done here so that we do it only once at start up and not on each report execution.

If the source is "enum", it returns the value using the "enumname" property. Notice there can be a list of Enumerations seperated by a semicolon ";". If such is the case we will append all the enumerations as the value of the argument.

If the source is "action", it assumes "value" represents a fully qualified constant name and returns the value of the constant followed by "_".

Otherwise, it returns the value of the "value" property.

public void setBaseBean (String value)

Sets the baseBean name associated with the argument

Parameters
value indicates the baseBean name associated with the argument

public void setEnumName (String value)

if the value of the argument is taken from an enumerations value, it represents the fully-qualified name of such a value.

public void setName (String name)

Set the name of the Shortcut instance

Parameters
name the String value of the name property - unique identifier of the Shortcut instance.

public void setSource (String value)

Indicates how to calculate the runtime value of the argument.

public void setSysBean (String value)

Represents the fully-qualified name of the interface to which the base bean is cast when the value of the argument comes from a method name of the base bean.

public void setValue (String value)

Sets the value of the argument. tThe meaning of the attribute depends on the base-bean and the source attributes:

  • if base-bean is specified, this attribute represents the name of a bean property; the value of the argument becomes the value of the bean property.
  • if source=action, this value represents the fully qualified name of a constant (for example: "com.microstrategy.web.app.beans.FilterEditorBean.L_ACTION_APPLY_EDIT_EXPRESSION"); the value of the argument becomes the value of the constant followed by '_'.
  • if source=enum, this value is ignored; the value of the argument becomes the value of the constant specified by the enumname attribute
  • otherwise, this value is used literally as the value of the argument.

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.