public class

BlockProperty

extends BlockTarget
java.lang.Object
   ↳ com.microstrategy.web.blocks.BlockTarget
     ↳ com.microstrategy.web.blocks.BlockProperty

Class Overview

This class represents a single Block property.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.blocks.BlockTarget
Public Methods
void accept(BlockVisitor visitor)
Accept a BlockVisitor to this BlockProperty.
BlockPropertyAnnotationGroups getAnnotationGroups(boolean create)
Returns the annotation groups associated with this Block Property.
Object getExpandedValue(BlockContext bContext)
Gets the "expanded" value of the Block Property.
String getName()
Returns the name of this property.
String getType()
Returns the type of this property.
Object getValue()
Returns the value of this property.
boolean hasAnnotationGroups()
Returns whether there are any annotation groups associated with this Block Property.
boolean hasMacros()
Returns whether the Block Property contains a macro or not.
boolean isScalarType()
Returns whether the property holds a scalar value (is of a scalar type) as opposed a reference type.
void modifyTypeValue(String newTypeName, Object newValue)
Modify both the type and value of a Block Property.
void setValue(Object suppliedValue)
Sets the value of this property.
[Expand]
Inherited Methods
From class com.microstrategy.web.blocks.BlockTarget
From class java.lang.Object

Public Methods

public void accept (BlockVisitor visitor)

Accept a BlockVisitor to this BlockProperty. Depending on the type and value of this property, a certain method on the visitor is invoked:

Parameters
visitor The BlockVisitor to accept.

public BlockPropertyAnnotationGroups getAnnotationGroups (boolean create)

Returns the annotation groups associated with this Block Property.

Parameters
create If no annotation groups exists, this indicates whether a new set should be created.
Returns

public Object getExpandedValue (BlockContext bContext)

Gets the "expanded" value of the Block Property. If a Block Property is assigned a string with macros embedded in it, then this method expands those macro values and normalizes the result. If there are no macro, this method returns the same as the getValue() method.

Parameters
bContext The BlockContext object which supports the expansion of macros references.
Returns
  • The "normalized" value of the property, after macro expansion.

public String getName ()

Returns the name of this property.

Returns
  • The name of this property.

public String getType ()

Returns the type of this property.

Returns
  • The type of this property.

public Object getValue ()

Returns the value of this property.

Returns
  • The value of this property.

public boolean hasAnnotationGroups ()

Returns whether there are any annotation groups associated with this Block Property.

Returns
  • Whether there are any annotation groups associated with this Block Property.

public boolean hasMacros ()

Returns whether the Block Property contains a macro or not.

Returns
  • Whether the Block Property value contains a macro.

public boolean isScalarType ()

Returns whether the property holds a scalar value (is of a scalar type) as opposed a reference type.

Returns
  • True, if the type is scalar; otherwise, False.

public void modifyTypeValue (String newTypeName, Object newValue)

Modify both the type and value of a Block Property.

Parameters
newTypeName The new type of the Block Property.
newValue The new value of the Block Property.

public void setValue (Object suppliedValue)

Sets the value of this property. In the process, it may "normalize" the value supplied. For example, if a String value is supplied to a Boolean property, it will try to normalize it to be a Boolean value.

Parameters
suppliedValue The supplied value of this property.