Class BlockProperty

  • All Implemented Interfaces:
    java.io.Serializable

    public class BlockProperty
    extends BlockTarget
    This class represents a single Block property.
    Since:
    MicroStrategy Web 8.1.0
    See Also:
    Serialized Form
    • Method Detail

      • hasMacros

        public boolean hasMacros()
        Returns whether the Block Property contains a macro or not.
        Returns:
        Whether the Block Property value contains a macro.
        Since:
        MicroStrategy Web 9.0.0
      • getName

        public java.lang.String getName()
        Returns the name of this property.
        Returns:
        The name of this property.
      • getType

        public java.lang.String getType()
        Returns the type of this property.
        Returns:
        The type of this property.
      • getValue

        public java.lang.Object getValue()
        Returns the value of this property.
        Returns:
        The value of this property.
      • setValue

        public void setValue​(java.lang.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.
      • modifyTypeValue

        public void modifyTypeValue​(java.lang.String newTypeName,
                                    java.lang.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.
      • isScalarType

        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.
      • getExpandedValue

        public java.lang.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.
        Since:
        MicroStrategy Web 9.0.0
      • hasAnnotationGroups

        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.
        Since:
        MicroStrategy Web 9.0.0
      • getAnnotationGroups

        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:
        A BlockPropertyAnnotationGroups object (if it exists or the caller set 'create' to true); otherwise it is null.
        Since:
        MicroStrategy Web 9.0.0