Class BlockRegistry


  • public class BlockRegistry
    extends java.lang.Object
    This class represents a collection of Blocks (likely parsed from an input library configuration file).
    Since:
    MicroStrategy Web 8.1.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<java.lang.String> getBlockModes​(java.lang.String name)
      Returns the list of modes that have some assignments associated with them.
      java.util.Iterator<java.lang.String> getBlockNames()
      Return a list of block names in this Registry.
      java.lang.Exception getException()
      Get the Exception object that was raised while parsing the XML text.
      java.util.List<java.io.File> getIncludedBlockDirectories()
      Returns a list of Block directories that have been included into this registry.
      java.util.List<java.io.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​(java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • loadConfigurationFile

        public static BlockRegistry loadConfigurationFile​(java.lang.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.
        Since:
        MicroStrategy Web 9.0.0
      • getIncludedBlockFiles

        public java.util.List<java.io.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.
        Since:
        MicroStrategy Web 9.0.0
      • getIncludedBlockDirectories

        public java.util.List<java.io.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.
        Since:
        MicroStrategy Web 9.0.0
      • hasException

        public boolean hasException()
        Whether there were an exception encountered while parsing the Library.
        Returns:
        True if there was an exception encountered.
        Since:
        MicroStrategy Web 9.0.0
      • getException

        public java.lang.Exception getException()
        Get the Exception object that was raised while parsing the XML text.
        Returns:
        The Exception object that was raised while parsing.
        Since:
        MicroStrategy Web 9.0.0
      • getBlockNames

        public java.util.Iterator<java.lang.String> getBlockNames()
        Return a list of block names in this Registry.
        Returns:
        A List of String Block names.
        Since:
        MicroStrategy Web 9.0.0
      • getBlockModes

        public java.util.Iterator<java.lang.String> getBlockModes​(java.lang.String name)
                                                           throws java.lang.Exception
        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:
        java.lang.Exception - If the name is null, empty or does not refer to a Block registered with this factory.
        Since:
        MicroStrategy Web 9.0.0