public class

BlockPropertyMacros

extends Object
java.lang.Object
   ↳ com.microstrategy.web.blocks.macros.BlockPropertyMacros

Class Overview

This class manages a collection of macros that are used in the context of a BlockRegistry.

Summary

Public Constructors
BlockPropertyMacros()
Public Methods
void addMacro(String macroName, String fqcn)
Associates a macro name with a fully qualified class name used to invoke it.
static boolean containsMacro(String value)
String expandPropertyValue(String value, BlockContext bContext)
Expands a macro in a property value.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BlockPropertyMacros ()

Public Methods

public void addMacro (String macroName, String fqcn)

Associates a macro name with a fully qualified class name used to invoke it.

Parameters
macroName The name of the macro.
fqcn The fully qualified class name of the BlockPropertyMacro class.
Throws
MacroDoesNotExist If the macro class cannot be instantiated by the supplied name.
MacroAlreadyExists If a macro by that name already exists.

public static boolean containsMacro (String value)

public String expandPropertyValue (String value, BlockContext bContext)

Expands a macro in a property value.

Parameters
value The String that contains a macro reference.
bContext The BlockContext object that is required for macro expansion.
Returns
  • The "expanded" value of the property string with macro references expanded.