Class WebGraphAreaExporter
- java.lang.Object
-
- com.microstrategy.web.blocks.exporters.WebGraphAreaExporter
-
- All Implemented Interfaces:
BlockExporter
public class WebGraphAreaExporter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected BlockFactory
blockFactory
protected java.lang.String
rootBlockName
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assignBlock(ExporterContext context, java.lang.String propName, java.lang.Object primaryObject, java.lang.Class<?> primaryObjectClass)
Assign a Block-type value to a Block Property.protected void
assignList(ExporterContext context, java.lang.String propName, java.lang.Object primaryObject, java.lang.Class<?> primaryObjectClass)
Assign a List-type value to a Block Property.protected void
assignProperties(ExporterContext context, java.lang.Object primaryObject)
protected void
assignScalar(ExporterContext context, java.lang.String propName, java.lang.Object propValue)
Assign a scalar value to a Block Property.Block
exportBlock(ExporterContext context, java.lang.Object primaryObject)
Instead of exporting INTO a named Bloc, this exports into a Block defined by the Exporter class.Block
exportBlock(ExporterContext context, java.lang.String blockName, java.lang.Object primaryObject)
Instead of exporting INTO a Block, this method exports a Block.void
exportInto(ExporterContext context, BlockList blockList, java.lang.Object primaryObject)
Instead of exporting into a BLOCK, this method exports the generated Block into the supplied LIST.void
exportInto(ExporterContext context, Block rootBlock, java.lang.Object primaryObject)
Export an object into a supplied Block instance.BlockList
exportList(ExporterContext context, java.lang.Object primaryObject)
Instead of exporting into a supplied BlockList, this method simply creates a new, empty BlockList and then callsBlockExporter.exportInto(ExporterContext, BlockList, Object)
.protected BlockProperty
getBlockProperty(ExporterContext context, java.lang.String propName)
Return a BlockProperty from the current Block.
-
-
-
Field Detail
-
blockFactory
protected BlockFactory blockFactory
-
rootBlockName
protected java.lang.String rootBlockName
-
-
Method Detail
-
assignProperties
protected void assignProperties(ExporterContext context, java.lang.Object primaryObject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
exportInto
public void exportInto(ExporterContext context, Block rootBlock, java.lang.Object primaryObject) throws java.lang.Exception
Description copied from interface:BlockExporter
Export an object into a supplied Block instance. This is effectively the "lowest" level interface to exporting.- Specified by:
exportInto
in interfaceBlockExporter
- Parameters:
context
- The ExporterContext object.rootBlock
- The root Block to export INTO.primaryObject
- The primary object that we are export.- Throws:
java.lang.Exception
- If we are unable to create a Block instance.
-
exportBlock
public Block exportBlock(ExporterContext context, java.lang.String blockName, java.lang.Object primaryObject) throws java.lang.Exception
Description copied from interface:BlockExporter
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 callsBlockExporter.exportInto(ExporterContext, Block, Object)
.- Specified by:
exportBlock
in interfaceBlockExporter
- 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:
java.lang.Exception
- If we are unable to create a Block instance.
-
exportList
public BlockList exportList(ExporterContext context, java.lang.Object primaryObject) throws java.lang.Exception
Description copied from interface:BlockExporter
Instead of exporting into a supplied BlockList, this method simply creates a new, empty BlockList and then callsBlockExporter.exportInto(ExporterContext, BlockList, Object)
. The newly created BlockList is returned.- Specified by:
exportList
in interfaceBlockExporter
- Parameters:
context
- The ExporterContext object.primaryObject
- The primary object that we are export.- Returns:
- The BlockList created by the Exporter.
- Throws:
java.lang.Exception
- If we are unable to create a Block instance.
-
exportBlock
public Block exportBlock(ExporterContext context, java.lang.Object primaryObject) throws java.lang.Exception
Description copied from interface:BlockExporter
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 callsBlockExporter.exportBlock(ExporterContext, String, Object)
.- Specified by:
exportBlock
in interfaceBlockExporter
- Parameters:
context
- The ExporterContext object.primaryObject
- The primary object that we are export.- Returns:
- The Block created by the Exporter.
- Throws:
java.lang.Exception
- If we are unable to create a Block instance.
-
exportInto
public void exportInto(ExporterContext context, BlockList blockList, java.lang.Object primaryObject) throws java.lang.Exception
Description copied from interface:BlockExporter
Instead of exporting into a BLOCK, this method exports the generated Block into the supplied LIST.- Specified by:
exportInto
in interfaceBlockExporter
- Parameters:
context
- The ExporterContext object.blockList
- The BlockList to export INTO.primaryObject
- The primary object that we are export.- Throws:
java.lang.Exception
- If we are unable to create a Block instance.
-
assignScalar
protected void assignScalar(ExporterContext context, java.lang.String propName, java.lang.Object propValue) throws java.lang.Exception
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:
java.lang.Exception
- if we are unable to create a Block or assign to a named Block Property.
-
assignBlock
protected void assignBlock(ExporterContext context, java.lang.String propName, java.lang.Object primaryObject, java.lang.Class<?> primaryObjectClass) throws java.lang.Exception
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:
java.lang.Exception
- If we are unable to create a Block or assign to a named Block Property.
-
getBlockProperty
protected BlockProperty getBlockProperty(ExporterContext context, java.lang.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, ornull
if no property exists with that name.
-
assignList
protected void assignList(ExporterContext context, java.lang.String propName, java.lang.Object primaryObject, java.lang.Class<?> primaryObjectClass) throws java.lang.Exception
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:
java.lang.Exception
- If we are unable to create a Block or assign to a named Block Property.
-
-