public class

BlockFactory

extends Object
java.lang.Object
   ↳ com.microstrategy.web.blocks.BlockFactory

Class Overview

This class manages the creation of Blocks.

Summary

Public Methods
BlockRegistry 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(String name, String mode)
Create and initialize a named Block.
Block newBlock(String name)
Create and initialize a named Block.
Block newBlock()
Create a new, empty, Block.
BlockList newBlockList()
Creates a new BlockList object instance.
void setBlockRegistry(BlockRegistry blockRegistry)
Sets the registry of blocks to be associated with this factory.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public BlockRegistry getBlockRegistry ()

Gets the registry of blocks that are associated with this factory.

Returns

public static BlockFactory getInstance ()

Returns an instance of a BlockFactory to use for creating Blocks.

Returns
  • A BlockFactory instance.

public Block newBlock (String name, String mode)

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
Exception If the name does not refer to a Block registered with this factory.
IllegalArgumentException If the name is empty or null or the mode is invalid.

public Block newBlock (String name)

Create and initialize a named Block.

Parameters
name The name of the Block to create.
Returns
  • A new instance of a Block.
Throws
Exception If the name does not refer to a Block registered with this factory.
IllegalArgumentException If the name is empty or null.

public Block newBlock ()

Create a new, empty, Block.

Returns
  • A Block which has no properties defined.

public BlockList newBlockList ()

Creates a new BlockList object instance.

Returns

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.