Package com.microstrategy.web.blocks
Class BlockList
- java.lang.Object
-
- com.microstrategy.web.blocks.BlockTarget
-
- com.microstrategy.web.blocks.BlockListElement
-
- com.microstrategy.web.blocks.BlockList
-
- All Implemented Interfaces:
java.io.Serializable
public class BlockList extends BlockListElement
This class represents a list in a Block.- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.blocks.BlockListElement
BlockListElement.ListAction
-
Nested classes/interfaces inherited from class com.microstrategy.web.blocks.BlockTarget
BlockTarget.PathInfo
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.blocks.BlockTarget
TARGETTYPE_BLOCK, TARGETTYPE_LIST, TARGETTYPE_PROPERTY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(BlockVisitor visitor)
Accept a BlockVisitor to this Block List.void
add(BlockListElement element)
Adds an existingBlockListElement
to this list.Block
addNewBlock()
Block
addNewBlock(java.lang.String blockName)
void
clear()
Empties the contents of this list.BlockListElement
get(int index)
Returns theBlockListElement
at the specified index.Block
getElement(java.lang.String listElementKey)
returns aBlock
whose list element is specifiedBlockList
putNewList()
BlockListElement
remove(int index)
Removes aBlockListElement
at a specified index from this list.BlockListElement
remove(java.lang.String key)
Removes theBlockListElement
whose list element key is specified.int
size()
Returns the number of elements in this list.-
Methods inherited from class com.microstrategy.web.blocks.BlockListElement
getListAction, getListElementKey, getListItem, setListAction, setListElementKey, setListItem, setListItem
-
Methods inherited from class com.microstrategy.web.blocks.BlockTarget
findProperties, getTargetType, resolvePath, resolvePath
-
-
-
-
Method Detail
-
size
public int size()
Returns the number of elements in this list.- Returns:
- The number of elements in this list.
-
get
public BlockListElement get(int index)
Returns theBlockListElement
at the specified index.- Parameters:
index
- The index of the list element to return.- Returns:
- The
BlockListElement
to return.
-
add
public void add(BlockListElement element)
Adds an existingBlockListElement
to this list. By default, this element is added to the end of the list. Properties of the BlockListElement can modify how it is added to the list.- Parameters:
element
- The list element to add.- See Also:
BlockListElement.ListAction
,BlockListElement.setListAction(ListAction)
,BlockListElement.setListItem(int)
,BlockListElement.setListItem(String)
-
addNewBlock
public Block addNewBlock()
-
addNewBlock
public Block addNewBlock(java.lang.String blockName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
putNewList
public BlockList putNewList()
-
clear
public void clear()
Empties the contents of this list.
-
remove
public BlockListElement remove(int index)
Removes aBlockListElement
at a specified index from this list.- Parameters:
index
- The index of the list element to remove.- Returns:
- The
BlockListElement
that was removed.
-
remove
public BlockListElement remove(java.lang.String key)
Removes theBlockListElement
whose list element key is specified.- Parameters:
key
- The list element key of the list element to remove.- Returns:
- The
BlockListElement
that was removed. - Since:
- MicroStrategy Web 9.0.0
-
accept
public void accept(BlockVisitor visitor)
Accept a BlockVisitor to this Block List. The visitor is notified in the following way:- First, at the start of the list
BlockVisitor.visitListStart(BlockList, BlockTarget)
. - If the return code is true, then each of the list element elements is visited.
- Finally, at the end of the list
BlockVisitor.visitListEnd(BlockList, BlockTarget)
.
- Parameters:
visitor
- TheBlockVisitor
instance.- Since:
- MicroStrategy Web 9.0.0
- First, at the start of the list
-
-