public class

WebBeanProperty

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.app.WebBeanProperty
Known Direct Subclasses

Class Overview

The WebBeanProperty class represents a property of a bean defined for a given Page.

Summary

Constants
String ATT_COMPARE
String ATT_FEATURE_ID
String ATT_NAME
String ATT_SOURCE
String ATT_TYPE
String ATT_VALUE
String NODE_PROPERTY
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
WebBeanProperty()
Class constructor.
WebBeanProperty(String name, int source, String value)
Class constructor.
WebBeanProperty(String name, String source, String value)
Class constructor.
WebBeanProperty(Node root)
Class constructor.
Public Methods
Object[] getArguments(AppContext appContext, Class target, Object objectInstance)
Object[] getArguments(AppContext appContext)
Returns an array of Object with all the arguments this property needs to set in order to invoke the object method to set the property.
String getCompare()
This method is deprecated. not used anymore. A Boolean property is true if its value is "true", "1", "1,0" or "0,1"
Object getContextValue(AppContext appContext)
Returns an object with the value that this property should receive at runtime.
String getFeatureId()
Object getKey()
Default implementation for getKey().
Method getMethod(Class target)
Returns the method that should get invoked to apply this property to an instance of an object of class target
String getName()
Returns the name of the WebBeanProperty instance, it's used as a unique identifier of the WebBeanProperty instance.
int getSource()
Get the source of the WebBeanProperty instance
String getSourceName()
Get the source name of the WebBeanProperty instance
String getType()
Get the type of the WebBeanProperty instance
String getValue()
Get the value of the WebBeanProperty instance
void setAppContext(AppContext appContext)
This method is deprecated. The AppContext should not be assigned as part of the definition of a WebBeanProperty. It will be removed in future versions.
void setCompare(String value)
This method is deprecated. not used anymore. A Boolean property is true if its value is "true", "1", "1,0" or "0,1"
void setFeatureId(String value)
Set the value of the feature property
void setKey(Element element)
Default implementation for setKey().
void setName(String name)
Sets the name of the WebBeanProperty instance, a unique identifier of the WebBeanProperty instance.
void setSource(int source)
Set the source of the WebBeanProperty instance
void setSourceName(String source)
Set the source of the WebBeanProperty instance
void setType(String type)
Set the type of the WebBeanProperty instance
void setValue(String value)
Set the value of the WebBeanProperty instance
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.
String getPropertyNode()
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.
[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_COMPARE

Constant Value: "compare"

public static final String ATT_FEATURE_ID

Constant Value: "feature-id"

public static final String ATT_NAME

Constant Value: "name"

public static final String ATT_SOURCE

Constant Value: "source"

public static final String ATT_TYPE

Constant Value: "type"

public static final String ATT_VALUE

Constant Value: "value"

public static final String NODE_PROPERTY

Constant Value: "property"

Public Constructors

public WebBeanProperty ()

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

public WebBeanProperty (String name, int source, String value)

Class constructor. Initializes a new instance of the WebBeanProperty with the values passed as parameters

Parameters
name String name of the WebBeanProperty.
source int source of the WebBeanProperty.
value String value of the WebBeanProperty.

public WebBeanProperty (String name, String source, String value)

Class constructor. Initializes a new instance of the WebBeanProperty with the values passed as parameters

Parameters
name String name of the WebBeanProperty.
source String source of the WebBeanProperty.
value String value of the WebBeanProperty.

public WebBeanProperty (Node root)

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

Parameters
root Node instance representing the web bean list information.

Public Methods

public Object[] getArguments (AppContext appContext, Class target, Object objectInstance)

public Object[] getArguments (AppContext appContext)

Returns an array of Object with all the arguments this property needs to set in order to invoke the object method to set the property.

Parameters
appContext The application context to retrieve the context value of the property
Returns
  • an array of Object with all the arguments this property needs

public String getCompare ()

This method is deprecated.
not used anymore. A Boolean property is true if its value is "true", "1", "1,0" or "0,1"

Used for Boolean properties. The actual value is compared to this one to determine if it is true.

Returns
  • String

public Object getContextValue (AppContext appContext)

Returns an object with the value that this property should receive at runtime. The value depends on the source of the property:

  • If the source is enumeration, it will try to retrieve the value of the field in that enumeration.
  • If the source is the request, it will try to retrieve the value from the request keys of the appContext object.
  • If the source is the preferences, it will look for a preference with the given name in the preferences object of the appContext and return the value of that preference
  • If the value is an application object, it will return that object from the appContext
  • In every other case, it just return the value of the property.

  • Parameters
    appContext the AppContext object from where to retrieve the property value.
    Returns
    • an object with the value that this property should receive at runtime.

    public String getFeatureId ()

    Returns
    • the value of the feature property

    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 Method getMethod (Class target)

    Returns the method that should get invoked to apply this property to an instance of an object of class target

    Parameters
    target the class which is target of this property
    Returns
    • the method that should get invoked

    public String getName ()

    Returns the name of the WebBeanProperty instance, it's used as a unique identifier of the WebBeanProperty instance.

    public int getSource ()

    Get the source of the WebBeanProperty instance

    Returns
    • the String value of the source property

    public String getSourceName ()

    Get the source name of the WebBeanProperty instance

    Returns
    • the String value of the source property

    public String getType ()

    Get the type of the WebBeanProperty instance

    Returns
    • the String type of the value property

    public String getValue ()

    Get the value of the WebBeanProperty instance

    Returns
    • the String value of the value property

    public void setAppContext (AppContext appContext)

    This method is deprecated.
    The AppContext should not be assigned as part of the definition of a WebBeanProperty. It will be removed in future versions.

    Parameters
    appContext AppContext instance to associate to this instance

    public void setCompare (String value)

    This method is deprecated.
    not used anymore. A Boolean property is true if its value is "true", "1", "1,0" or "0,1"

    Used for Boolean properties. The actual value is compared to this one to determine if it is true.

    Parameters
    value String

    public void setFeatureId (String value)

    Set the value of the feature property

    Parameters
    value String with the value to set to the feature property

    public 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.

    public void setName (String name)

    Sets the name of the WebBeanProperty instance, a unique identifier of the WebBeanProperty instance.

    public void setSource (int source)

    Set the source of the WebBeanProperty instance

    Parameters
    source the String value of the source property

    public void setSourceName (String source)

    Set the source of the WebBeanProperty instance

    Parameters
    source the String value of the source property

    public void setType (String type)

    Set the type of the WebBeanProperty instance

    Parameters
    type the String value of the value property

    public void setValue (String value)

    Set the value of the WebBeanProperty instance

    Parameters
    value the String value of the value property

    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 String getPropertyNode ()

    Returns
    • the name of the property node.

    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.