Class ClientSideLayouts


  • public class ClientSideLayouts
    extends java.lang.Object
    This class provides the front-end from retrieving client-side layout contents for use with the Javascript UI Library (JUIL). It interacts with server-side caches to reduce the number of file accesses. In this respect, it is merely a helper class for client-side layouts.
    Since:
    MicroStrategy Web 9.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BLOCK_PROPERTY_LAYOUT_CLASS_NAME
      The name of the Block Property that we will scan for layout classes.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getLayoutClassName​(java.lang.String layoutClass)
      Returns the layout class name without the plugin macro.
      static java.lang.String getLayoutStatement​(java.lang.String layoutClass)
      Returns a JavaScript statement which defines the layout for a given layout class.
      static void getLayoutStatementsFromBlock​(MarkupOutput out, Block block)
      Get an entire set of JavaScript layout statements by scanning a Block tree for all layout classes that are defined in a specific named Block Property.
      static void getLayoutStatementsFromBlock​(MarkupOutput out, Block block, java.lang.String propName)
      Get an entire set of JavaScript layout statements by scanning a Block tree for all layout classes that are defined in a specific named Block Property.
      static java.lang.String getPlugin​(java.lang.String layoutClass)
      Returns the plugin macro contained in the layout class property.
      • Methods inherited from class java.lang.Object

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

      • BLOCK_PROPERTY_LAYOUT_CLASS_NAME

        public static final java.lang.String BLOCK_PROPERTY_LAYOUT_CLASS_NAME
        The name of the Block Property that we will scan for layout classes.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ClientSideLayouts

        public ClientSideLayouts()
    • Method Detail

      • getLayoutStatement

        public static java.lang.String getLayoutStatement​(java.lang.String layoutClass)
        Returns a JavaScript statement which defines the layout for a given layout class.
        Parameters:
        layoutClass - The name of the layout class to retrieve.
        Returns:
        A JavaScript statement that assigns to the layout class the textual declaration of the layout. If the layout class does not exist or is malformed, then null is returned.
      • getLayoutStatementsFromBlock

        public static void getLayoutStatementsFromBlock​(MarkupOutput out,
                                                        Block block)
        Get an entire set of JavaScript layout statements by scanning a Block tree for all layout classes that are defined in a specific named Block Property. The name of the Block Property to inspect is defined in BLOCK_PROPERTY_LAYOUT_CLASS_NAME.
        Parameters:
        out - The MarkupOutput to generate the JavaScript statements into.
        block - The Block instance to scan for layout classes referenced in a BlockProperty value.
        See Also:
        getLayoutStatementsFromBlock(MarkupOutput, Block)
      • getLayoutStatementsFromBlock

        public static void getLayoutStatementsFromBlock​(MarkupOutput out,
                                                        Block block,
                                                        java.lang.String propName)
        Get an entire set of JavaScript layout statements by scanning a Block tree for all layout classes that are defined in a specific named Block Property.
        Parameters:
        out - The MarkupOutput to generate the JavaScript statements into.
        block - The Block instance to scan for layout classes referenced in a BlockProperty value.
        propName - The name of the BlockProperty to inspect for layout class names.
      • getLayoutClassName

        public static java.lang.String getLayoutClassName​(java.lang.String layoutClass)
        Returns the layout class name without the plugin macro.
        Parameters:
        layoutClass - The layout class property value for the block. It may contains a plugin macro, such as "@plugin1:".
        Returns:
        the layout class name without the plugin macro.
      • getPlugin

        public static java.lang.String getPlugin​(java.lang.String layoutClass)
        Returns the plugin macro contained in the layout class property.
        Parameters:
        layoutClass - The layout class property value for the block. It may contains a plugin macro, such as "@plugin1:".
        Returns:
        the plugin macro, such as "@plugin1:".