java.lang.Object | |||
↳ | com.microstrategy.web.blocks.BlockTarget | ||
↳ | com.microstrategy.web.blocks.BlockListElement | ||
↳ | com.microstrategy.web.blocks.Block |
This class represents a generic Block. A Block essentially consists of a set of PROPERTIES and a RENDERER. It also has a NAME which is used by the FACTORY. It is essentially a specialized DATA CONTAINER with a well-defined way to RENDER its contents through a generic RENDERER interface.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
accept(BlockVisitor visitor)
Accept a BlockVisitor to this Block.
| ||||||||||
void |
accept(BlockVisitor visitor, Comparator<BlockProperty> blockPropertyComparator)
Accept a BlockVisitor to this Block.
| ||||||||||
BlockProperty |
defineProperty(String name, String type)
Defines a new property for a Block.
| ||||||||||
MarkupOutput |
generateMarkup(BlockContext blockContext)
Generate the markup for this Block using the RENDERER instance (or
fully qualified class name)..
| ||||||||||
BlockPropertyAnnotationGroups |
getAnnotationGroups(boolean create)
Returns the annotation groups associated with this Block.
| ||||||||||
Iterator<String> |
getBaseBlocks(boolean expand)
Returns an Iterator of Block names: either just the directly specified
base Blocks (expand == false) or all base Blocks (expand == true).
| ||||||||||
String |
getFileName()
Returns the file name where the Block was read from.
| ||||||||||
String |
getName()
Returns the name of this Block.
| ||||||||||
BlockProperty |
getOrCreateProperty(String propName, String propType)
Returns a property whose name is 'propName'.
| ||||||||||
BlockProperty |
getProperty(String name)
Returns the Property with a given name.
| ||||||||||
BlockProperty |
getPropertyByIndex(int index)
Returns the Property at a given numeric index.
| ||||||||||
int |
getPropertySize()
Returns the number of properties in this Block.
| ||||||||||
boolean |
hasAnnotationGroups()
Returns whether there are any annotation groups associated with
this Block.
| ||||||||||
boolean |
propertyExists(String name)
Returns true if a property with a specific name exists.
| ||||||||||
void |
put(String propName, double propValue)
Sets property value.
| ||||||||||
void |
put(String propName, boolean propValue)
Sets property value.
| ||||||||||
void |
put(String propName, Block propValue)
Sets property value.
| ||||||||||
void |
put(String propName, int propValue)
Sets property value.
| ||||||||||
void |
put(String propName, long propValue)
Sets property value.
| ||||||||||
void |
put(String propName, String propValue)
Sets property value.
| ||||||||||
void |
put(String propName, BlockList propValue)
Sets property value.
| ||||||||||
Block | putNewBlock(String propName) | ||||||||||
Block | putNewBlock(String propName, String blockName) | ||||||||||
BlockList | putNewList(String propName) | ||||||||||
void |
setName(String name)
Sets the name of this Block.
| ||||||||||
BlockProperty |
setOrCreateProperty(String propName, String propType, Object propValue)
Sets a property (creating it, if necessary) to a specific value.
| ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Accept a BlockVisitor to this Block. The visitor is notified in the following way:
visitBlockStart(Block, BlockTarget)
visitBlockStart(Block, BlockTarget)
is true, then each of the BlockProperties are visited.visitBlockEnd(Block, BlockTarget)
.
visitor | The BlockVisitor instance which will visit this Block. |
---|
Accept a BlockVisitor to this Block. The visitor is notified in the following way:
visitBlockStart(Block, BlockTarget)
visitBlockStart(Block, BlockTarget)
is true, then each of the BlockProperties are visited.visitBlockEnd(Block, BlockTarget)
.visitor | The BlockVisitor instance which will visit this Block. |
---|---|
blockPropertyComparator | The XmlRendererANF.BlockPropertyComparator instance which will be used to compare the block property. |
Defines a new property for a Block.
name | The name of the property. |
---|---|
type | The type of the property. |
BlockProperty
.Exception | If the property is already defined. |
---|
Generate the markup for this Block using the RENDERER instance (or fully qualified class name)..
blockContext | The BlockContext that defines information about how Blocks
are constructed, expanded and serialized. |
---|
MarkupOutput
object containing the markup generated
for this Block.Exception | If we are unable to create an instance of the desired RENDERER or there is an exception in the process of generating the markup. |
---|
Returns the annotation groups associated with this Block.
create | If no annotation groups exists, this indicates whether a new set should be created. |
---|
BlockPropertyAnnotationGroups
object (if it exists or
the caller set 'create' to true); otherwise it is null.
Returns an Iterator of Block names: either just the directly specified base Blocks (expand == false) or all base Blocks (expand == true).
expand | Whether or not to expand the list of Block names to all indirectly accessible Blocks or just the direct ones. |
---|
Returns the file name where the Block was read from.
Returns the name of this Block.
Returns a property whose name is 'propName'. If it does not exist, then create that property (whose type is 'propType').
propName | The name of the property that you want to get (or create). |
---|---|
propType | The type of the property (a value of one of the
PROPTYPE_Xxx constants in BlockProperty ). |
BlockProperty
that you wanted to access.Returns the Property with a given name.
name | The name of the property to return. |
---|
BlockProperty
object with the specified name, if it
exists. If it does not exist, then returns null.
Returns the Property at a given numeric index.
index | The index of the Property to return (first index=0). |
---|
BlockProperty
object at the specified index, if it
exists. If it does not exist, then an IllegalArgumentException
is thrown.IllegalArgumentException | If the index is out of range. |
---|
Returns the number of properties in this Block.
Returns whether there are any annotation groups associated with this Block.
Returns true if a property with a specific name exists.
name | The name of the property to check for. |
---|
Sets property value. If the property is not present then it will be created.
propName | The property name |
---|---|
propValue | The property value |
Sets property value. If the property is not present then it will be created.
propName | The property name |
---|---|
propValue | The property value |
Sets property value. If the property is not present then it will be created.
propName | The property name |
---|---|
propValue | The property value |
Sets property value. If the property is not present then it will be created.
propName | The property name |
---|---|
propValue | The property value |
Sets property value. If the property is not present then it will be created.
propName | The property name |
---|---|
propValue | The property value |
Sets property value. If the property is not present then it will be created.
propName | The property name |
---|---|
propValue | The property value |
Sets property value. If the property is not present then it will be created.
propName | The property name |
---|---|
propValue | The property value |
Sets the name of this Block.
name | The name of this Block. |
---|
Sets a property (creating it, if necessary) to a specific value.
propName | The name of the property to set. |
---|---|
propType | The type of the property from EnumBlockPropertyTypes |
propValue | The value of the property. |
BlockProperty
object that was set (or created).