Package com.microstrategy.web.transform
Class LayoutImpl
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.transform.AbstractStyleCatalogElement
-
- com.microstrategy.web.transform.LayoutImpl
-
- All Implemented Interfaces:
ConfigurationElement
,ConfigurationFile
,Layout
,java.lang.Cloneable
public class LayoutImpl extends AbstractStyleCatalogElement implements Layout
This class implements the Layout interface in the Style Catalog.- Since:
- MicroStrategy Web 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
AbstractConfigurationElement.FilteredList
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
ATT_LAYOUT_SOURCE
protected static java.lang.String
ATT_ORDER
protected static java.lang.String
NODE_LAYOUT
-
Fields inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
ATT_CONFIG_SRC, ATT_DELETED, ATT_POSITION, ATT_PROTOTYPE, ATT_USE_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description LayoutImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.java.lang.Object
getKey()
Default implementation forgetKey()
.protected java.lang.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 thegetKey
andsetKey
methods.LayoutTag
getLayoutDefinition(LayoutParser desiredParser)
This method returns the in-memory representation of the layout definition to use with this specific style.java.lang.String
getLayoutLocator()
This method returns the layout locator string associated with this layout.LayoutSourceDefn
getLayoutSourceDefn()
This method returns theLayoutSourceDefn
object associated with this layout.java.lang.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(java.lang.String layoutLocator)
This method sets the layout locator (String) associated with this layout.void
setLayoutSourceDefn(LayoutSourceDefn layoutSourceDefn)
This method sets theLayoutSourceDefn
object associated with this layout.void
setLayoutSourceName(java.lang.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 boolean
useNodeValue()
Controls whether this element will use the node value as a property.-
Methods inherited from class com.microstrategy.web.transform.AbstractStyleCatalogElement
copyContents, getStyleCatalog, hasChanged, reload, resetChanged, setStrAttribute
-
Methods inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
addFileSource, applyCustomization, applyCustomizations, cleanUpDeletedElements, clone, delete, deltas, deltas, equalAtts, equalElements, equalNodeValues, equals, equalsIncludingDeletedElements, exportAttributesToXML, exportElementsToXML, exportNodeValueToXML, getAttribute, getAttributes, getBoolAttribute, getChildKey, getConfigSrc, getDTDFileName, getElement, getElement, getElements, getFileLoader, getIntAttribute, getIntAttribute, getLineNumber, getList, getNextKey, getNodeName, getNodeValue, getNodeValue, getOrCreateElement, getParent, getPosition, getPrototype, getRegisteredClass, getSelfInitPath, getSource, getStrAttribute, getUseDefault, getXMLParserParameters, getXMLSerializerParameters, hashCode, hashCodeAtts, hashCodeElements, hashCodeNodeValues, hasRegisteredClass, initAttributesFromXML, initDefaultAttributes, initElementFromXML, initElementsFromXML, initFromFile, initFromResource, initFromXML, initFromXML, initNodeValueFromXML, initPrototype, isActive, isCustomized, isDeleted, isDirty, isInSource, isKeyAttribute, load, mergeChanges, newChildInstance, newSource, original, populate, printAttributes, printElements, printNodeValue, refreshLists, registerClass, registerElement, registerElement, registerElementList, reloadPrototype, removeAttribute, removeDefaults, replaceList, restore, save, save, saveChangesAs, saveConfig, saveFlatXML, saveNode, saveSource, setAttribute, setBoolAttribute, setChildOriginals, setConfigSrc, setCustomized, setElement, setFileLoader, setIntAttribute, setKey, setLineNumber, setNodeName, setNodeValue, setPosition, setPrototype, setSelfInitPath, setUseDefault, setUseValidation, throwConfigParseException, toString, toXML, toXML, toXML, toXML, useValidation
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.microstrategy.utils.config.ConfigurationElement
getAttribute, getAttributes, getElement, getElements, getNodeName, getStrAttribute, initFromXML, reload, toXML
-
-
-
-
Field Detail
-
ATT_LAYOUT_SOURCE
protected static final java.lang.String ATT_LAYOUT_SOURCE
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
ATT_ORDER
protected static final java.lang.String ATT_ORDER
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
NODE_LAYOUT
protected static final java.lang.String NODE_LAYOUT
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
clearCaches
protected void clearCaches()
Description copied from class:AbstractStyleCatalogElement
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.- Overrides:
clearCaches
in classAbstractStyleCatalogElement
- Since:
- MicroStrategy Web 9.0.0
-
getLayoutSourceDefn
public LayoutSourceDefn getLayoutSourceDefn()
Description copied from interface:Layout
This method returns theLayoutSourceDefn
object associated with this layout. The underlyingLayoutSource
object instance is used to perform the actual retrieval of the layout definition.- Specified by:
getLayoutSourceDefn
in interfaceLayout
- Returns:
- The
LayoutSourceDefn
object associated with this layout.
-
setLayoutSourceDefn
public void setLayoutSourceDefn(LayoutSourceDefn layoutSourceDefn)
Description copied from interface:Layout
This method sets theLayoutSourceDefn
object associated with this layout. The underlyingLayoutSource
object instance is used to perform the actual retrieval of the layout definition.- Specified by:
setLayoutSourceDefn
in interfaceLayout
- Parameters:
layoutSourceDefn
- TheLayoutSourceDefn
object instance to use.
-
getLayoutSourceName
public java.lang.String getLayoutSourceName()
Description copied from interface:Layout
Return the name of the LayoutSourceDefn currently associated with this Layout.- Specified by:
getLayoutSourceName
in interfaceLayout
- Since:
- MicroStrategy Web 9.0.0
-
setLayoutSourceName
public void setLayoutSourceName(java.lang.String value)
Description copied from interface:Layout
Associates a LayoutSourceDefn with this Layout based on its name.- Specified by:
setLayoutSourceName
in interfaceLayout
- Since:
- MicroStrategy Web 9.0.0
-
getOrder
public int getOrder()
Description copied from interface:Layout
This method returns the precedence order of this specific layout. The higher the number, the earlier it will get evaluated.
-
setOrder
public void setOrder(int order)
Description copied from interface:Layout
This method sets the precedence order of this specific layout. The higher the number, the earlier it will get evaluated.
-
getLayoutDefinition
public LayoutTag getLayoutDefinition(LayoutParser desiredParser) throws WebTransformException
Description copied from interface:Layout
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).- Specified by:
getLayoutDefinition
in interfaceLayout
- Parameters:
desiredParser
- If a layout definition needs to be parsed, then use the suppliedLayoutParser
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).
-
getLayoutLocator
public java.lang.String getLayoutLocator()
Description copied from interface:Layout
This method returns the layout locator string associated with this layout.- Specified by:
getLayoutLocator
in interfaceLayout
- Returns:
- The layout "location" as a String.
-
setLayoutLocator
public void setLayoutLocator(java.lang.String layoutLocator)
Description copied from interface:Layout
This method sets the layout locator (String) associated with this layout.- Specified by:
setLayoutLocator
in interfaceLayout
- Parameters:
layoutLocator
- The string representation of the layout location. The actual syntax is defined by theLayoutSource
object it is associated with.
-
useNodeValue
protected boolean useNodeValue()
Description copied from class:AbstractConfigurationElement
Controls whether this element will use the node value as a property. For example, nodes defined as:
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.<a att="1">This is the node value</a>
- Overrides:
useNodeValue
in classAbstractConfigurationElement
- Returns:
false
by default. Override this method if you want to associate the node value with some property.- Since:
- MicroStrategy Web 9.0.0
-
getKeyAttribute
protected java.lang.String getKeyAttribute()
Description copied from class:AbstractConfigurationElement
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 thegetKey
andsetKey
methods.- Specified by:
getKeyAttribute
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
getKey
public java.lang.Object getKey()
Description copied from class:AbstractConfigurationElement
Default implementation forgetKey()
. It assumes a single attribute can be used to uniquely identify this element among its siblings; the attribute to use is specified by thegetKeyAttribute()
method.- Specified by:
getKey
in interfaceConfigurationElement
- Overrides:
getKey
in classAbstractConfigurationElement
- Returns:
- If
getKeyAttribute()
is empty returnsnull
, otherwise it returns the value of the given attribute. - Since:
- MicroStrategy Web 9.0.0
-
-