Class BlockPropertyMacros


  • public class BlockPropertyMacros
    extends java.lang.Object
    This class manages a collection of macros that are used in the context of a BlockRegistry.
    Since:
    MicroStrategy Web 9.0.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMacro​(java.lang.String macroName, java.lang.String fqcn)
      Associates a macro name with a fully qualified class name used to invoke it.
      static boolean containsMacro​(java.lang.String value)  
      java.lang.String expandPropertyValue​(java.lang.String value, BlockContext bContext)
      Expands a macro in a property value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BlockPropertyMacros

        public BlockPropertyMacros()
    • Method Detail

      • addMacro

        public void addMacro​(java.lang.String macroName,
                             java.lang.String fqcn)
                      throws MacroDoesNotExist,
                             MacroAlreadyExists
        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.
      • expandPropertyValue

        public java.lang.String expandPropertyValue​(java.lang.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.
      • containsMacro

        public static boolean containsMacro​(java.lang.String value)