Class BlockFactory


  • public class BlockFactory
    extends java.lang.Object
    This class manages the creation of Blocks.
    Since:
    MicroStrategy Web 8.1.0
    • Method Detail

      • getInstance

        public static BlockFactory getInstance()
        Returns an instance of a BlockFactory to use for creating Blocks.
        Returns:
        A BlockFactory instance.
      • destroy

        public void destroy()
        Destroy the HashSet and other caches, will be called when destroying the sevlet
      • getBlockRegistry

        public BlockRegistry getBlockRegistry()
        Gets the registry of blocks that are associated with this factory.
        Returns:
        The BlockRegistry used with this factory.
        Since:
        MicroStrategy Web 9.0.0
      • setBlockRegistry

        public void setBlockRegistry​(BlockRegistry blockRegistry)
        Sets the registry of blocks to be associated with this factory.
        Parameters:
        blockRegistry - The BlockRegistry to use with this factory.
        Since:
        MicroStrategy Web 9.0.0
      • newBlock

        public Block newBlock()
        Create a new, empty, Block.
        Returns:
        A Block which has no properties defined.
      • newBlock

        public Block newBlock​(java.lang.String name)
                       throws java.lang.Exception
        Create and initialize a named Block.
        Parameters:
        name - The name of the Block to create.
        Returns:
        A new instance of a Block.
        Throws:
        java.lang.Exception - If the name does not refer to a Block registered with this factory.
        java.lang.IllegalArgumentException - If the name is empty or null.
        Since:
        MicroStrategy Web 9.0.0
      • newBlock

        public Block newBlock​(java.lang.String name,
                              java.lang.String mode)
                       throws java.lang.Exception
        Create and initialize a named Block.
        Parameters:
        name - The name of the Block to create.
        mode - The mode that the Block should be initialized for.
        Returns:
        A new instance of a Block.
        Throws:
        java.lang.Exception - If the name does not refer to a Block registered with this factory.
        java.lang.IllegalArgumentException - If the name is empty or null or the mode is invalid.
        Since:
        MicroStrategy Web 9.0.0
      • newBlockList

        public BlockList newBlockList()
        Creates a new BlockList object instance.
        Returns:
        A new BlockList object instance.
        Since:
        MicroStrategy Web 9.0.0