Package com.microstrategy.web.blocks
Class BlockFactory
- java.lang.Object
 - 
- com.microstrategy.web.blocks.BlockFactory
 
 
- 
public class BlockFactory extends java.lang.ObjectThis class manages the creation of Blocks.- Since:
 - MicroStrategy Web 8.1.0
 
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroy the HashSet and other caches, will be called when destroying the sevletBlockRegistrygetBlockRegistry()Gets the registry of blocks that are associated with this factory.static BlockFactorygetInstance()Returns an instance of a BlockFactory to use for creating Blocks.BlocknewBlock()Create a new, empty, Block.BlocknewBlock(java.lang.String name)Create and initialize a named Block.BlocknewBlock(java.lang.String name, java.lang.String mode)Create and initialize a named Block.BlockListnewBlockList()Creates a newBlockListobject instance.voidsetBlockRegistry(BlockRegistry blockRegistry)Sets the registry of blocks to be associated with this factory. 
 - 
 
- 
- 
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 
BlockRegistryused 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- TheBlockRegistryto use with this factory.- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
newBlock
public Block newBlock()
Create a new, empty, Block.- Returns:
 - A 
Blockwhich 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
 
 
 - 
 
 -