Class DefaultBlockVisitor

  • All Implemented Interfaces:
    BlockVisitor
    Direct Known Subclasses:
    XmlRendererBlockVisitorENF

    public class DefaultBlockVisitor
    extends java.lang.Object
    implements BlockVisitor
    A default implementation of the BlockVisitor interface. All methods are "no ops". Methods that return a boolean value return true. This class provides a simple way to implement the BlockVisitor interface by only overriding those methods that you are interested in.
    Since:
    MicroStrategy Web 9.0.0
    • Constructor Detail

      • DefaultBlockVisitor

        public DefaultBlockVisitor()
    • Method Detail

      • visitBlockEnd

        public void visitBlockEnd​(Block block,
                                  BlockTarget parent)
        Description copied from interface: BlockVisitor
        Invoked for each Block after all of its properties are visited.
        Specified by:
        visitBlockEnd in interface BlockVisitor
        Parameters:
        block - The Block being visited.
        parent - The BlockTarget that contains the supplied Block.
      • visitUnassignedProperty

        public void visitUnassignedProperty​(BlockProperty blockProperty,
                                            Block parent)
        Description copied from interface: BlockVisitor
        Invoked for each unassigned block property. An "unassigned" BlockProperty is one whose value is null.
        Specified by:
        visitUnassignedProperty in interface BlockVisitor
        Parameters:
        blockProperty - The BlockProperty that has an unassigned value.
        parent - The Block that contains this BlockProperty.
      • visitScalarProperty

        public void visitScalarProperty​(BlockProperty blockProperty,
                                        Block parent,
                                        boolean firstAssignedProperty)
        Description copied from interface: BlockVisitor
        Invoked for each scalar (non-Block, non-BlockList) Block Property. In particular, it is only invoked for BlockProperty instances whose value is non-null.
        Specified by:
        visitScalarProperty in interface BlockVisitor
        Parameters:
        blockProperty - The BlockProperty that has an assigned value.
        parent - The Block that contains this BlockProperty.
        firstAssignedProperty - Whether or not this is the first assigned property of the Block.
      • visitCompositeProperty

        public boolean visitCompositeProperty​(BlockProperty blockProperty,
                                              Block parent,
                                              boolean firstAssignedProperty)
        Description copied from interface: BlockVisitor
        Invoked for each composite (Block or BlockList) Block Property. In particular, it is only invoked for BlockProperty instances whose value is non-null.
        Specified by:
        visitCompositeProperty in interface BlockVisitor
        Parameters:
        blockProperty - The BlockProperty that has an assigned value.
        parent - The Block that contains this BlockProperty.
        firstAssignedProperty - Whether or not this is the first assigned property of the Block.
        Returns:
        True if the Block Property should traverse the composite value of this property. If false, there is no traversal.
      • visitListStart

        public boolean visitListStart​(BlockList blockList,
                                      BlockTarget parent)
        Description copied from interface: BlockVisitor
        Invoked at the beginning of a BlockList.
        Specified by:
        visitListStart in interface BlockVisitor
        Parameters:
        blockList - The BlockList that we are visiting.
        parent - The BlockTarget that contains the supplied BlockList.
        Returns:
        True if the Block List should traverse each of the elements of its list. If false, the list elements are not traversed.