Package com.microstrategy.web.tags
Class LayoutContext
- java.lang.Object
-
- com.microstrategy.web.tags.LayoutContext
-
public class LayoutContext extends java.lang.ObjectTheLayoutContextclass holds the information required by the layout rendering methods to generate dynamic contents.- Since:
- MicroStrategy Web 8.0.0
-
-
Constructor Summary
Constructors Constructor Description LayoutContext(Transform trans, Transformable data)Constructs a LayoutContext object with the specified transform and transformable objects.LayoutContext(Transform trans, Transformable data, boolean excludeStaticTags)Constructs a LayoutContext object with the specified transform and transformable objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddList(java.lang.String key, java.util.List list)Caches aListof values with the specifiedkey.voidaddObjectInfo(java.lang.String key, BaseObjectInfo o)Caches an object for further reference with the specifiedkey.booleanexcludeStaticTags()Returns a boolean value indicating whether to exclude the static contents while rendering the layout source.BlockgetBlock()Get the top block on the Block stack.BlockContextgetBlockContext()Returns the BlockContext associated with this layout.intgetBlockSize()BlockTargetgetBlockTarget()BlockgetLastPoppedBlock()Returns the last block that was popped off of the Block stack.java.util.ListgetList(java.lang.String key)Returns the cached list of values through the specified key.BaseObjectInfogetObjectInfo(java.lang.String key)Returns the cached base object through the specified key.BlockgetRootBlock(int index)Returns the ith root Block.BlockgetRootBlock(java.lang.String rootBlockName)Returns the root Block with a specified name.TransformgetTransform()Returns theTransformobject.TransformablegetTransformable()Returns theTransformableobject.BlockpopBlock()Pops the top block off of the Block stack.BlockTargetpopBlockTarget()voidpushBlock(Block block)Pushes a Block instance into the current Block stack.voidpushBlockTarget(BlockTarget pathTarget)voidremoveList(java.lang.String key)Removes the cached list through the specified key.voidremoveObjectInfo(java.lang.String key)Removes the cached base object through the specified key.voidsetBlockContext(BlockContext blockContext)Sets the BlockContext associated with this layout.
-
-
-
Constructor Detail
-
LayoutContext
public LayoutContext(Transform trans, Transformable data)
Constructs a LayoutContext object with the specified transform and transformable objects. It is equivalent to call the overloaded constructorLayoutContext(trans, data, false).- Parameters:
trans- a Transform instance.data- a Transformable instance.
-
LayoutContext
public LayoutContext(Transform trans, Transformable data, boolean excludeStaticTags)
Constructs a LayoutContext object with the specified transform and transformable objects. If the parameterexcludeStaticTagsis true, the rendering method should discard any static contents defined in the layout but only generate dynamic contents.- Parameters:
trans- a Transform instance.data- a Transformable instance.excludeStaticTags-trueto exclude static contents defined in the layout XHTML source.
-
-
Method Detail
-
addObjectInfo
public void addObjectInfo(java.lang.String key, BaseObjectInfo o)Caches an object for further reference with the specifiedkey.- Parameters:
key- the key to retrieve the cached list of values.o- the object to be cached.- Since:
- MicroStrategy Web 9.0.0
-
addList
public void addList(java.lang.String key, java.util.List list)Caches aListof values with the specifiedkey.- Parameters:
key- the key to retrieve the cached list of values.list- a list of values.
-
getObjectInfo
public BaseObjectInfo getObjectInfo(java.lang.String key)
Returns the cached base object through the specified key.Nullis returned if there is no such an object with the named key.- Parameters:
key- the key used to retrieve the object- Returns:
- a
Objectwith the specified key as the id. - Since:
- MicroStrategy Web 9.0.0
-
getList
public java.util.List getList(java.lang.String key)
Returns the cached list of values through the specified key.Nullis returned if there is no such a list with the named key.- Parameters:
key- the key used to retrieve the cached values- Returns:
- a
Listof values cached.
-
removeList
public void removeList(java.lang.String key)
Removes the cached list through the specified key.- Parameters:
key- the key used to look up for the cached list.
-
removeObjectInfo
public void removeObjectInfo(java.lang.String key)
Removes the cached base object through the specified key.- Parameters:
key- the key used to look up for the cached object.- Since:
- MicroStrategy Web 9.0.0
-
excludeStaticTags
public boolean excludeStaticTags()
Returns a boolean value indicating whether to exclude the static contents while rendering the layout source.- Returns:
trueto exclude the static contents.
-
getTransform
public Transform getTransform()
Returns theTransformobject.- Returns:
- the Transform object.
-
getTransformable
public Transformable getTransformable()
Returns theTransformableobject.- Returns:
- the Transformable object.
-
getBlock
public Block getBlock()
Get the top block on the Block stack. This block is not removed from the stack--only returned.- Returns:
- The current top of the
Blockstack. - Since:
- MicroStrategy Web 8.1.0
-
pushBlock
public void pushBlock(Block block)
Pushes a Block instance into the current Block stack. If it is the first block added, it is considered a "root" Block (and can be later retrieved viagetRootBlock(int).- Parameters:
block- TheBlockto add to the current Block stack.- Since:
- MicroStrategy Web 8.1.0
-
popBlock
public Block popBlock()
Pops the top block off of the Block stack.- Returns:
- The top
Blockwhich was popped off of the stack. - Since:
- MicroStrategy Web 8.1.0
-
getLastPoppedBlock
public Block getLastPoppedBlock()
Returns the last block that was popped off of the Block stack.- Returns:
- The last
Blockthat was popped off of the Block stack. - Since:
- MicroStrategy Web 8.1.0
- See Also:
popBlock()
-
getRootBlock
public Block getRootBlock(int index) throws java.lang.IndexOutOfBoundsException
Returns the ith root Block.- Parameters:
index- The index of the "root" Block to return.- Returns:
- The ith "root"
Block. - Throws:
java.lang.IndexOutOfBoundsException- Since:
- MicroStrategy Web 9.0.0
-
getRootBlock
public Block getRootBlock(java.lang.String rootBlockName)
Returns the root Block with a specified name.- Parameters:
rootBlockName- The name of the root Block to return.- Returns:
- The
Blockwhose name is matched. - Since:
- MicroStrategy Web 9.0.0
-
getBlockContext
public BlockContext getBlockContext()
Returns the BlockContext associated with this layout.- Returns:
- The
BlockContextassociated with this layout. - Since:
- MicroStrategy Web 9.0.0
-
setBlockContext
public void setBlockContext(BlockContext blockContext)
Sets the BlockContext associated with this layout.- Parameters:
blockContext- TheBlockContextobject associated with this layout.- Since:
- MicroStrategy Web 9.0.0
-
pushBlockTarget
public void pushBlockTarget(BlockTarget pathTarget)
- Since:
- MicroStrategy Web 9.0.0
-
getBlockTarget
public BlockTarget getBlockTarget()
- Since:
- MicroStrategy Web 9.0.0
-
popBlockTarget
public BlockTarget popBlockTarget()
- Since:
- MicroStrategy Web 9.0.0
-
getBlockSize
public int getBlockSize()
- Since:
- MicroStrategy Web 9.0.0
-
-