Interface Layout

  • All Superinterfaces:
    java.lang.Cloneable, ConfigurationElement
    All Known Implementing Classes:
    LayoutImpl

    public interface Layout
    extends ConfigurationElement
    The Layout interface represents a single layout that is associated with a style. It consists of three fundamental components:
    • A layout "locator" which identifies where a layout can be found
    • A layout source which uses the layout location to find the associated definition source and convert it into an in-memory representation.
    • A precedence order property which defines the order in which this layout should be searched. The Layouts interface will inspect layouts in order of decreasing precedence order.
    This interface also exposes a top-level method to return the in-memory representation of the layout, in the form of a LayoutTag object.
    Since:
    MicroStrategy Web 8.0.0
    • Method Detail

      • getLayoutLocator

        java.lang.String getLayoutLocator()
        This method returns the layout locator string associated with this layout.
        Returns:
        The layout "location" as a String.
      • setLayoutLocator

        void setLayoutLocator​(java.lang.String layoutLocator)
        This method sets the layout locator (String) associated with this layout.
        Parameters:
        layoutLocator - The string representation of the layout location. The actual syntax is defined by the LayoutSource object it is associated with.
      • getLayoutSourceName

        java.lang.String getLayoutSourceName()
        Return the name of the LayoutSourceDefn currently associated with this Layout.
        Since:
        MicroStrategy Web 9.0.0
      • setLayoutSourceName

        void setLayoutSourceName​(java.lang.String name)
        Associates a LayoutSourceDefn with this Layout based on its name.
        Since:
        MicroStrategy Web 9.0.0
      • getLayoutSourceDefn

        LayoutSourceDefn getLayoutSourceDefn()
        This method returns the LayoutSourceDefn object associated with this layout. The underlying LayoutSource object instance is used to perform the actual retrieval of the layout definition.
        Returns:
        The LayoutSourceDefn object associated with this layout.
      • setLayoutSourceDefn

        void setLayoutSourceDefn​(LayoutSourceDefn layoutSourceDefn)
        Deprecated.
        The LayoutSourceDefn should not be explicitly set, it should be resolved automatically by the Layout automatically from the LayoutSourceName property.
        This method sets the LayoutSourceDefn object associated with this layout. The underlying LayoutSource object instance is used to perform the actual retrieval of the layout definition.
        Parameters:
        layoutSourceDefn - The LayoutSourceDefn object instance to use.
      • getOrder

        int getOrder()
        Deprecated.
        The order is not relevant anymore as there can only be one Layout associated with a Style.
        This method returns the precedence order of this specific layout. The higher the number, the earlier it will get evaluated.
        Returns:
        The numeric value of the precedence order.
      • setOrder

        void setOrder​(int order)
        Deprecated.
        The order is not relevant anymore as there can only be one Layout associated with a Style.
        This method sets the precedence order of this specific layout. The higher the number, the earlier it will get evaluated.
        Parameters:
        order - The numeric value of the precedence order.
      • getLayoutDefinition

        LayoutTag getLayoutDefinition​(LayoutParser desiredParser)
                               throws WebTransformException
        This method returns the in-memory representation of the layout definition to use with this specific style. This object may be the result of a parse operation or it may have been previously cached (and simply returned).
        Parameters:
        desiredParser - If a layout definition needs to be parsed, then use the supplied LayoutParser object.
        Returns:
        The in-memory representation of the layout definition (in the form of a root
        Throws:
        WebTransformException - thrown if there is any error occurred. LayoutTag tag).