public class

LayoutImpl

extends AbstractStyleCatalogElement
implements Layout
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.transform.AbstractStyleCatalogElement
       ↳ com.microstrategy.web.transform.LayoutImpl

Class Overview

This class implements the Layout interface in the Style Catalog.

Summary

Constants
String ATT_LAYOUT_SOURCE
String ATT_ORDER
String NODE_LAYOUT
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
LayoutImpl()
Public Methods
Object getKey()
Default implementation for getKey().
LayoutTag getLayoutDefinition(LayoutParser desiredParser)
This method returns the in-memory representation of the layout definition to use with this specific style.
String getLayoutLocator()
This method returns the layout locator string associated with this layout.
LayoutSourceDefn getLayoutSourceDefn()
This method returns the LayoutSourceDefn object associated with this layout.
String getLayoutSourceName()
Return the name of the LayoutSourceDefn currently associated with this Layout.
int getOrder()
This method returns the precedence order of this specific layout.
void setLayoutLocator(String layoutLocator)
This method sets the layout locator (String) associated with this layout.
void setLayoutSourceDefn(LayoutSourceDefn layoutSourceDefn)
This method sets the LayoutSourceDefn object associated with this layout.
void setLayoutSourceName(String value)
Associates a LayoutSourceDefn with this Layout based on its name.
void setOrder(int order)
This method sets the precedence order of this specific layout.
Protected Methods
void clearCaches()
This method is invoked whenever the structure of the style catalog has changed and caches to other objects in the structure needs to be updated.
String getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
boolean useNodeValue()
Controls whether this element will use the node value as a property.
[Expand]
Inherited Methods
From class com.microstrategy.web.transform.AbstractStyleCatalogElement
From class com.microstrategy.utils.config.AbstractConfigurationElement
From class java.lang.Object
From interface com.microstrategy.utils.config.ConfigurationElement
From interface com.microstrategy.utils.config.ConfigurationFile
From interface com.microstrategy.web.transform.Layout

Constants

protected static final String ATT_LAYOUT_SOURCE

Constant Value: "layout_source"

protected static final String ATT_ORDER

Constant Value: "order"

protected static final String NODE_LAYOUT

Constant Value: "Layout"

Public Constructors

public LayoutImpl ()

Public Methods

public Object getKey ()

Default implementation for getKey(). It assumes a single attribute can be used to uniquely identify this element among its siblings; the attribute to use is specified by the getKeyAttribute() method.

Returns
  • If getKeyAttribute() is empty returns null, otherwise it returns the value of the given attribute.

public LayoutTag getLayoutDefinition (LayoutParser desiredParser)

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

public String getLayoutLocator ()

This method returns the layout locator string associated with this layout.

Returns
  • The layout "location" as a String.

public 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

public String getLayoutSourceName ()

Return the name of the LayoutSourceDefn currently associated with this Layout.

public int getOrder ()

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.

public void setLayoutLocator (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.

public void setLayoutSourceDefn (LayoutSourceDefn layoutSourceDefn)

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.

public void setLayoutSourceName (String value)

Associates a LayoutSourceDefn with this Layout based on its name.

public void setOrder (int order)

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.

Protected Methods

protected void clearCaches ()

This method is invoked whenever the structure of the style catalog has changed and caches to other objects in the structure needs to be updated.

protected String getKeyAttribute ()

This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.

protected boolean useNodeValue ()

Controls whether this element will use the node value as a property. For example, nodes defined as:


  <a att="1">This is the node value</a>
 
can expose a property which will return the node's value (This is the node vale). When this is the case, though, the element can't have any sub elements. They're mutually exclusive.

Returns
  • false by default. Override this method if you want to associate the node value with some property.