Interface LayoutSource

  • All Known Implementing Classes:
    AbstractLayoutSource, AppLayoutSourceFile, LayoutSourceFile, LayoutSourceString

    public interface LayoutSource
    The LayoutSource interface represents an object that can retrieve a layout definition from a specific storage repository. The location of the layout is supplied (in string form) to this object. The syntax of the locator string is up to each LayoutSource implementation. This interface must also possess the ability to save an in-memory layout definition back using a supplied location string.
    Since:
    MicroStrategy Web 8.0.0
    • Method Detail

      • getDescription

        java.lang.String getDescription()
        Gets the description of this layout source object (to be read by someone wishing to use it). This description should include the syntax for a valid location.
        Returns:
        A textual description of this layout source object.
      • retrieveLayoutDefinition

        LayoutTag retrieveLayoutDefinition​(java.lang.String sourceLocation,
                                           LayoutParser layoutParser)
                                    throws WebTransformException
        Retrieves an in-memory representation of the layout at the supplied source location. If a layout has already been loaded, it should be returned as is. If there is not already an existing in-memory representation, the layout definition (as a String) should be parsed using the supplied LayoutParser.
        Parameters:
        sourceLocation - The location that the layout definition can be found.
        layoutParser - A layout parser to use, if necessary.
        Returns:
        The in-memory representation of the layout definition.
        Throws:
        WebTransformException - This exception is thrown if the layout definition could not be loaded.
      • saveLayoutDefinition

        void saveLayoutDefinition​(java.lang.String targetLocation,
                                  LayoutTag layoutDefn)
                           throws WebTransformException
        Saves the in-memory layout definition back to its persistent storage at the supplied target location.
        Parameters:
        targetLocation - The location where the layout definition should be saved.
        layoutDefn - The in-memory layout definition to save.
        Throws:
        WebTransformException - This exception is thrown if the layout definition could not be saved back to the target location.