Package com.microstrategy.web.blocks
Class BlockFactory
- java.lang.Object
-
- com.microstrategy.web.blocks.BlockFactory
-
public class BlockFactory extends java.lang.Object
This 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 void
destroy()
Destroy the HashSet and other caches, will be called when destroying the sevletBlockRegistry
getBlockRegistry()
Gets the registry of blocks that are associated with this factory.static BlockFactory
getInstance()
Returns an instance of a BlockFactory to use for creating Blocks.Block
newBlock()
Create a new, empty, Block.Block
newBlock(java.lang.String name)
Create and initialize a named Block.Block
newBlock(java.lang.String name, java.lang.String mode)
Create and initialize a named Block.BlockList
newBlockList()
Creates a newBlockList
object instance.void
setBlockRegistry(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
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
- TheBlockRegistry
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
-
-