Package com.microstrategy.web.blocks
Class BlockListElement
- java.lang.Object
-
- com.microstrategy.web.blocks.BlockTarget
-
- com.microstrategy.web.blocks.BlockListElement
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class BlockListElement extends BlockTarget
This class represents a generic element of a List. This is used as a base class for a List or a Block.- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlockListElement.ListActionThis enumeration defines the types of actions that may be associated with a BlockListElement when it is added to a BlockList.-
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 BlockListElement.ListActiongetListAction()Returns the specified list action to perform when a Block List Element is added to a list.java.lang.StringgetListElementKey()Returns the key associated with this list element, if one exists.java.lang.ObjectgetListItem()Returns the "list item" specified for this Block.voidsetListAction(BlockListElement.ListAction listAction)Sets the specified list action to perform when a Block List Element is added to a list.voidsetListElementKey(java.lang.String key)Sets the key to be associated with this list element.voidsetListItem(int listItem)Sets the "list item" to a numeric index.voidsetListItem(java.lang.String key)Sets the "list item" to either a numeric index or a key.-
Methods inherited from class com.microstrategy.web.blocks.BlockTarget
findProperties, getTargetType, resolvePath, resolvePath
-
-
-
-
Method Detail
-
getListElementKey
public java.lang.String getListElementKey()
Returns the key associated with this list element, if one exists.- Returns:
- The key for this list element, or
nullif none exists. - Since:
- MicroStrategy Web 9.0.0
-
setListElementKey
public void setListElementKey(java.lang.String key)
Sets the key to be associated with this list element. This key is used to associate an identifier with a specific index in the containing BlockList. Note that changing the key has no effect after a list element has been added to a list.- Parameters:
key- The key used to identify this "slot" in the BlockList.- Since:
- MicroStrategy Web 9.0.0
-
getListItem
public java.lang.Object getListItem()
Returns the "list item" specified for this Block. Only valid when the Block is in a "list context", a "list item" specifies the existing element that an "insert", "add" or "replace" operation is relative to. If a numeric index was specified, then this method returns anInteger. Otherwise, it returns the (String) key specified.- Returns:
- Either an
Integeror aString, if it was specified. Otherwise, it isnull. - Since:
- MicroStrategy Web 9.0.0
-
setListItem
public void setListItem(int listItem)
Sets the "list item" to a numeric index.- Parameters:
listItem- The numeric index to use with an "add", "insert" or "replace" operation.- Since:
- MicroStrategy Web 9.0.0
-
setListItem
public void setListItem(java.lang.String key)
Sets the "list item" to either a numeric index or a key. It tries to parse the string as an integer. If valid, an Integer is created. Otherwise, the String is used as the key of the item.- Parameters:
key- Either a number or key, saved as a String.- Since:
- MicroStrategy Web 9.0.0
-
getListAction
public BlockListElement.ListAction getListAction()
Returns the specified list action to perform when a Block List Element is added to a list.- Returns:
- The specified list action (a value of the
BlockListElement.ListActionenumeration). - Since:
- MicroStrategy Web 9.0.0
-
setListAction
public void setListAction(BlockListElement.ListAction listAction)
Sets the specified list action to perform when a Block List Element is added to a list.- Parameters:
listAction- A value from theBlockListElement.ListActionenumeration.- Since:
- MicroStrategy Web 9.0.0
-
-