Package com.microstrategy.web.app
Class WebBeanProperty
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.app.WebBeanProperty
-
- All Implemented Interfaces:
ConfigurationElement
,ConfigurationFile
,java.lang.Cloneable
- Direct Known Subclasses:
WebAttribute
public class WebBeanProperty extends AbstractConfigurationElement
The WebBeanProperty class represents a property of a bean defined for a given Page.- 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_COMPARE
static java.lang.String
ATT_FEATURE_ID
static java.lang.String
ATT_NAME
static java.lang.String
ATT_SOURCE
static java.lang.String
ATT_TYPE
static java.lang.String
ATT_VALUE
static java.lang.String
NODE_PROPERTY
-
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 WebBeanProperty()
Class constructor.WebBeanProperty(java.lang.String name, int source, java.lang.String value)
Class constructor.WebBeanProperty(java.lang.String name, java.lang.String source, java.lang.String value)
Class constructor.WebBeanProperty(org.w3c.dom.Node root)
Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.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.java.lang.Object[]
getArguments(AppContext appContext, java.lang.Class target, java.lang.Object objectInstance)
java.lang.String
getCompare()
Deprecated.not used anymore.java.lang.Object
getContextValue(AppContext appContext)
Returns an object with the value that this property should receive at runtime.java.lang.String
getFeatureId()
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.reflect.Method
getMethod(java.lang.Class target)
Returns the method that should get invoked to apply this property to an instance of an object of classtarget
java.lang.String
getName()
Returns the name of the WebBeanProperty instance, it's used as a unique identifier of the WebBeanProperty instance.protected java.lang.String
getPropertyNode()
int
getSource()
Get the source of the WebBeanProperty instancejava.lang.String
getSourceName()
Get the source name of the WebBeanProperty instancejava.lang.String
getType()
Get the type of the WebBeanProperty instancejava.lang.String
getValue()
Get the value of the WebBeanProperty instanceprotected 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
setAppContext(AppContext appContext)
Deprecated.The AppContext should not be assigned as part of the definition of a WebBeanProperty.void
setCompare(java.lang.String value)
Deprecated.not used anymore.void
setFeatureId(java.lang.String value)
Set the value of the feature propertyvoid
setKey(org.w3c.dom.Element element)
Default implementation forsetKey()
.void
setName(java.lang.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 instancevoid
setSourceName(java.lang.String source)
Set the source of the WebBeanProperty instancevoid
setType(java.lang.String type)
Set the type of the WebBeanProperty instancevoid
setValue(java.lang.String value)
Set the value of the WebBeanProperty instance-
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
-
ATT_TYPE
public static final java.lang.String ATT_TYPE
- 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_COMPARE
public static final java.lang.String ATT_COMPARE
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ATT_SOURCE
public static final java.lang.String ATT_SOURCE
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ATT_VALUE
public static final java.lang.String ATT_VALUE
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ATT_NAME
public static final java.lang.String ATT_NAME
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
NODE_PROPERTY
public static final java.lang.String NODE_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebBeanProperty
public WebBeanProperty()
Class constructor. Initializes a new -empty- instance of the WebBeanProperty class.
-
WebBeanProperty
public WebBeanProperty(java.lang.String name, int source, java.lang.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.
-
WebBeanProperty
public WebBeanProperty(java.lang.String name, java.lang.String source, java.lang.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.
-
WebBeanProperty
public WebBeanProperty(org.w3c.dom.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.
-
-
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
-
getMethod
public java.lang.reflect.Method getMethod(java.lang.Class target)
Returns the method that should get invoked to apply this property to an instance of an object of classtarget
- Parameters:
target
- the class which is target of this property- Returns:
- the method that should get invoked
-
getArguments
public java.lang.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
-
getArguments
public java.lang.Object[] getArguments(AppContext appContext, java.lang.Class target, java.lang.Object objectInstance)
-
getContextValue
public java.lang.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.
-
setName
public void setName(java.lang.String name)
Sets the name of the WebBeanProperty instance, a unique identifier of the WebBeanProperty instance.
-
getName
public java.lang.String getName()
Returns the name of the WebBeanProperty instance, it's used as a unique identifier of the WebBeanProperty instance.
-
setSource
public void setSource(int source)
Set the source of the WebBeanProperty instance- Parameters:
source
- theString
value of the source property
-
setSourceName
public void setSourceName(java.lang.String source)
Set the source of the WebBeanProperty instance- Parameters:
source
- theString
value of the source property
-
getSource
public int getSource()
Get the source of the WebBeanProperty instance- Returns:
- the
String
value of the source property
-
getSourceName
public java.lang.String getSourceName()
Get the source name of the WebBeanProperty instance- Returns:
- the
String
value of the source property
-
setValue
public void setValue(java.lang.String value)
Set the value of the WebBeanProperty instance- Parameters:
value
- theString
value of the value property
-
getValue
public java.lang.String getValue()
Get the value of the WebBeanProperty instance- Returns:
- the
String
value of the value property
-
setType
public void setType(java.lang.String type)
Set the type of the WebBeanProperty instance- Parameters:
type
- theString
value of the value property
-
getType
public java.lang.String getType()
Get the type of the WebBeanProperty instance- Returns:
- the
String
type of the value property
-
setCompare
@Deprecated public void setCompare(java.lang.String value)
Deprecated.not used anymore. ABoolean
property is true if its value is "true", "1", "1,0" or "0,1"Used forBoolean
properties. The actual value is compared to this one to determine if it is true.- Parameters:
value
- String
-
getCompare
@Deprecated public java.lang.String getCompare()
Deprecated.not used anymore. ABoolean
property is true if its value is "true", "1", "1,0" or "0,1"Used forBoolean
properties. The actual value is compared to this one to determine if it is true.- Returns:
- String
-
setFeatureId
public void setFeatureId(java.lang.String value)
Set the value of the feature property- Parameters:
value
- String with the value to set to the feature property- Since:
- MicroStrategy Web 8.0.0
-
getFeatureId
public java.lang.String getFeatureId()
- Returns:
- the value of the feature property
- Since:
- MicroStrategy Web 8.0.0
-
setAppContext
@Deprecated public void setAppContext(AppContext appContext)
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- Since:
- MicroStrategy Web 8.0.0
-
getPropertyNode
protected java.lang.String getPropertyNode()
- Returns:
- the name of the property node.
- Since:
- MicroStrategy Web 8.0.0
-
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
public 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
-
-