public class

LayoutSourceString

extends AbstractLayoutSource
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractLayoutSource
     ↳ com.microstrategy.web.transform.LayoutSourceString

Class Overview

The LayoutSourceFile implements the LayoutSource interface by providing using the "location" to be the actual layout definition. This facilitates storing the layout defintion directly in the Style Catalog.

Summary

Public Constructors
LayoutSourceString()
Public Methods
String getDescription()
Gets the description of this layout source object (to be read by someone wishing to use it).
LayoutTag retrieveLayoutDefinition(String sourceLocation, LayoutParser layoutParser)
Retrieves an in-memory representation of the layout at the supplied source location.
void saveLayoutDefinition(String targetLocation, LayoutTag layoutDefn)
Saves the in-memory layout definition back to its persistent storage at the supplied target location.
Protected Methods
String getLayoutString(String location)
Returns the string representation of a layout definition.
[Expand]
Inherited Methods
From class com.microstrategy.web.transform.AbstractLayoutSource
From class java.lang.Object
From interface com.microstrategy.web.transform.LayoutSource

Public Constructors

public LayoutSourceString ()

Public Methods

public 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.

public LayoutTag retrieveLayoutDefinition (String sourceLocation, LayoutParser layoutParser)

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 thrown if the layout can not be parsed.

public void saveLayoutDefinition (String targetLocation, LayoutTag layoutDefn)

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.

Protected Methods

protected String getLayoutString (String location)

Returns the string representation of a layout definition. The layout cache uses this method to load the layout definition string and then delegates to the layout parser to parse it. The parsed layou definition is cached.

Parameters
location the layout location, defined in the StyleCatalog XML file.
Returns
  • the string representation of a layout definition.