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.StringATT_COMPAREstatic java.lang.StringATT_FEATURE_IDstatic java.lang.StringATT_NAMEstatic java.lang.StringATT_SOURCEstatic java.lang.StringATT_TYPEstatic java.lang.StringATT_VALUEstatic java.lang.StringNODE_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.StringgetCompare()Deprecated.not used anymore.java.lang.ObjectgetContextValue(AppContext appContext)Returns an object with the value that this property should receive at runtime.java.lang.StringgetFeatureId()java.lang.ObjectgetKey()Default implementation forgetKey().protected java.lang.StringgetKeyAttribute()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 thegetKeyandsetKeymethods.java.lang.reflect.MethodgetMethod(java.lang.Class target)Returns the method that should get invoked to apply this property to an instance of an object of classtargetjava.lang.StringgetName()Returns the name of the WebBeanProperty instance, it's used as a unique identifier of the WebBeanProperty instance.protected java.lang.StringgetPropertyNode()intgetSource()Get the source of the WebBeanProperty instancejava.lang.StringgetSourceName()Get the source name of the WebBeanProperty instancejava.lang.StringgetType()Get the type of the WebBeanProperty instancejava.lang.StringgetValue()Get the value of the WebBeanProperty instanceprotected voidinitDefaultAttributes()This method can be overridden to set default values for attributes.protected booleanisKeyAttribute(java.lang.String name)Returnstrueis the name is that of the key attribute.voidsetAppContext(AppContext appContext)Deprecated.The AppContext should not be assigned as part of the definition of a WebBeanProperty.voidsetCompare(java.lang.String value)Deprecated.not used anymore.voidsetFeatureId(java.lang.String value)Set the value of the feature propertyvoidsetKey(org.w3c.dom.Element element)Default implementation forsetKey().voidsetName(java.lang.String name)Sets the name of the WebBeanProperty instance, a unique identifier of the WebBeanProperty instance.voidsetSource(int source)Set the source of the WebBeanProperty instancevoidsetSourceName(java.lang.String source)Set the source of the WebBeanProperty instancevoidsetType(java.lang.String type)Set the type of the WebBeanProperty instancevoidsetValue(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-Stringname of the WebBeanProperty.source-intsource of the WebBeanProperty.value-Stringvalue 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-Stringname of the WebBeanProperty.source-Stringsource of the WebBeanProperty.value-Stringvalue 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:AbstractConfigurationElementThis method can be overridden to set default values for attributes. Simply extend this method and callAbstractConfigurationElement.setAttribute(java.lang.String, java.lang.Object)- Overrides:
initDefaultAttributesin 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- theStringvalue of the source property
-
setSourceName
public void setSourceName(java.lang.String source)
Set the source of the WebBeanProperty instance- Parameters:
source- theStringvalue of the source property
-
getSource
public int getSource()
Get the source of the WebBeanProperty instance- Returns:
- the
Stringvalue of the source property
-
getSourceName
public java.lang.String getSourceName()
Get the source name of the WebBeanProperty instance- Returns:
- the
Stringvalue of the source property
-
setValue
public void setValue(java.lang.String value)
Set the value of the WebBeanProperty instance- Parameters:
value- theStringvalue of the value property
-
getValue
public java.lang.String getValue()
Get the value of the WebBeanProperty instance- Returns:
- the
Stringvalue of the value property
-
setType
public void setType(java.lang.String type)
Set the type of the WebBeanProperty instance- Parameters:
type- theStringvalue of the value property
-
getType
public java.lang.String getType()
Get the type of the WebBeanProperty instance- Returns:
- the
Stringtype of the value property
-
setCompare
@Deprecated public void setCompare(java.lang.String value)
Deprecated.not used anymore. ABooleanproperty is true if its value is "true", "1", "1,0" or "0,1"Used forBooleanproperties. 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. ABooleanproperty is true if its value is "true", "1", "1,0" or "0,1"Used forBooleanproperties. 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-AppContextinstance 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:AbstractConfigurationElementThis method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKeyandsetKeymethods.- Specified by:
getKeyAttributein classAbstractConfigurationElement- Since:
- MicroStrategy Web 9.0.0
-
getKey
public java.lang.Object getKey()
Description copied from class:AbstractConfigurationElementDefault 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:
getKeyin interfaceConfigurationElement- Overrides:
getKeyin 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:AbstractConfigurationElementDefault 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:
setKeyin classAbstractConfigurationElement- Since:
- MicroStrategy Web 9.0.0
-
isKeyAttribute
protected boolean isKeyAttribute(java.lang.String name)
Description copied from class:AbstractConfigurationElementReturnstrueis the name is that of the key attribute.- Overrides:
isKeyAttributein classAbstractConfigurationElement- Since:
- MicroStrategy Web 9.0.0
-
-