public class

BlockRegistry

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

Class Overview

This class represents a collection of Blocks (likely parsed from an input library configuration file).

Summary

Public Methods
Iterator<String> getBlockModes(String name)
Returns the list of modes that have some assignments associated with them.
Iterator<String> getBlockNames()
Return a list of block names in this Registry.
Exception getException()
Get the Exception object that was raised while parsing the XML text.
List<File> getIncludedBlockDirectories()
Returns a list of Block directories that have been included into this registry.
List<File> getIncludedBlockFiles()
Returns a list of Block files that have been included into this registry.
boolean hasException()
Whether there were an exception encountered while parsing the Library.
static BlockRegistry loadConfigurationFile(String srcLocation, MessageRouter msgRouter)
Loads the configuration content from the given srcLocation file and returns a Block Registry object that contains all Blocks defined in it.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Iterator<String> getBlockModes (String name)

Returns the list of modes that have some assignments associated with them.

Parameters
name The name of the Block to inspect.
Returns
  • An Iterator of Strings that represent the modes that have a set of assignments.
Throws
Exception If the name is null, empty or does not refer to a Block registered with this factory.

public Iterator<String> getBlockNames ()

Return a list of block names in this Registry.

Returns
  • A List of String Block names.

public Exception getException ()

Get the Exception object that was raised while parsing the XML text.

Returns
  • The Exception object that was raised while parsing.

public List<File> getIncludedBlockDirectories ()

Returns a list of Block directories that have been included into this registry.

Returns
  • A List of Block directory File instances that have been been included into this registry.

public List<File> getIncludedBlockFiles ()

Returns a list of Block files that have been included into this registry.

Returns
  • A List of individual Block File instances that have been included into this registry.

public boolean hasException ()

Whether there were an exception encountered while parsing the Library.

Returns
  • True if there was an exception encountered.

public static BlockRegistry loadConfigurationFile (String srcLocation, MessageRouter msgRouter)

Loads the configuration content from the given srcLocation file and returns a Block Registry object that contains all Blocks defined in it.

Parameters
srcLocation The originating location of the configuration XML.
msgRouter The DefaultMessageRouter to use report errors and warnings during loading and parsing.
Returns
  • An instance of a BlockRegistry that can be associated with a BlockFactory instance.