public class

WebPropertyExporter

extends Object
implements BlockExporter
java.lang.Object
   ↳ com.microstrategy.web.blocks.exporters.WebPropertyExporter

Summary

Fields
protected BlockFactory blockFactory
protected String rootBlockName
Public Methods
Block exportBlock(ExporterContext context, String blockName, Object primaryObject)
Instead of exporting INTO a Block, this method exports a Block.
Block exportBlock(ExporterContext context, Object primaryObject)
Instead of exporting INTO a named Bloc, this exports into a Block defined by the Exporter class.
void exportInto(ExporterContext context, BlockList blockList, Object primaryObject)
Instead of exporting into a BLOCK, this method exports the generated Block into the supplied LIST.
void exportInto(ExporterContext context, Block rootBlock, Object primaryObject)
Export an object into a supplied Block instance.
BlockList exportList(ExporterContext context, Object primaryObject)
Instead of exporting into a supplied BlockList, this method simply creates a new, empty BlockList and then calls exportInto(ExporterContext, BlockList, Object).
Protected Methods
void assignBlock(ExporterContext context, String propName, Object primaryObject, Class<?> primaryObjectClass)
Assign a Block-type value to a Block Property.
void assignList(ExporterContext context, String propName, Object primaryObject, Class<?> primaryObjectClass)
Assign a List-type value to a Block Property.
void assignProperties(ExporterContext context, Object primaryObject)
void assignScalar(ExporterContext context, String propName, Object propValue)
Assign a scalar value to a Block Property.
BlockProperty getBlockProperty(ExporterContext context, String propName)
Return a BlockProperty from the current Block.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.blocks.exporters.BlockExporter

Fields

protected BlockFactory blockFactory

protected String rootBlockName

Public Methods

public Block exportBlock (ExporterContext context, String blockName, Object primaryObject)

Instead of exporting INTO a Block, this method exports a Block. It is up to the caller to determine what is done with it. This method creates a Block and then calls exportInto(ExporterContext, Block, Object).

Parameters
context The ExporterContext object.
blockName The name of the root block to create an instance for.
primaryObject The primary object that we are export.
Returns
  • The Block created by the Exporter.
Throws
Exception

public Block exportBlock (ExporterContext context, Object primaryObject)

Instead of exporting INTO a named Bloc, this exports into a Block defined by the Exporter class. This method collects the root block defined by Exporter and calls exportBlock(ExporterContext, String, Object).

Parameters
context The ExporterContext object.
primaryObject The primary object that we are export.
Returns
  • The Block created by the Exporter.
Throws
Exception

public void exportInto (ExporterContext context, BlockList blockList, Object primaryObject)

Instead of exporting into a BLOCK, this method exports the generated Block into the supplied LIST.

Parameters
context The ExporterContext object.
blockList The BlockList to export INTO.
primaryObject The primary object that we are export.
Throws
Exception

public void exportInto (ExporterContext context, Block rootBlock, Object primaryObject)

Export an object into a supplied Block instance. This is effectively the "lowest" level interface to exporting.

Parameters
context The ExporterContext object.
rootBlock The root Block to export INTO.
primaryObject The primary object that we are export.
Throws
Exception

public BlockList exportList (ExporterContext context, Object primaryObject)

Instead of exporting into a supplied BlockList, this method simply creates a new, empty BlockList and then calls exportInto(ExporterContext, BlockList, Object). The newly created BlockList is returned.

Parameters
context The ExporterContext object.
primaryObject The primary object that we are export.
Returns
  • The BlockList created by the Exporter.
Throws
Exception

Protected Methods

protected void assignBlock (ExporterContext context, String propName, Object primaryObject, Class<?> primaryObjectClass)

Assign a Block-type value to a Block Property.

Parameters
context The ExporterContext instance.
propName The name of the BlockProperty to assign to.
primaryObject The primary object that we are exporting to a Block.
primaryObjectClass The type of the primary object which is used to select the Exporter.
Throws
Exception If we are unable to create a Block or assign to a named Block Property.

protected void assignList (ExporterContext context, String propName, Object primaryObject, Class<?> primaryObjectClass)

Assign a List-type value to a Block Property.

Parameters
context The ExporterContext object.
propName The name of the Block Property to assign to.
primaryObject The primary object that contains a list of source objects.
primaryObjectClass The type of the primary object.
Throws
Exception If we are unable to create a Block or assign to a named Block Property.

protected void assignProperties (ExporterContext context, Object primaryObject)

Throws
Exception

protected void assignScalar (ExporterContext context, String propName, Object propValue)

Assign a scalar value to a Block Property.

Parameters
context The ExporterContext instance.
propName The name of the BlockProperty to assign to.
propValue The value to assign to the BlockProperty.
Throws
Exception if we are unable to create a Block or assign to a named Block Property.

protected BlockProperty getBlockProperty (ExporterContext context, String propName)

Return a BlockProperty from the current Block.

Parameters
context The ExporterContext object for this export.
propName The name of the Block Property to retrieve.
Returns
  • The BlockProperty instance with the supplied name, or null if no property exists with that name.