Interface BlockExporter

    • Method Detail

      • exportInto

        void exportInto​(ExporterContext context,
                        Block rootBlock,
                        java.lang.Object primaryObject)
                 throws java.lang.Exception
        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:
        java.lang.Exception - If we are unable to create a Block instance.
      • exportBlock

        Block exportBlock​(ExporterContext context,
                          java.lang.String blockName,
                          java.lang.Object primaryObject)
                   throws java.lang.Exception
        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:
        java.lang.Exception - If we are unable to create a Block instance.
      • exportBlock

        Block exportBlock​(ExporterContext context,
                          java.lang.Object primaryObject)
                   throws java.lang.Exception
        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:
        java.lang.Exception - If we are unable to create a Block instance.
      • exportInto

        void exportInto​(ExporterContext context,
                        BlockList blockList,
                        java.lang.Object primaryObject)
                 throws java.lang.Exception
        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:
        java.lang.Exception - If we are unable to create a Block instance.
      • exportList

        BlockList exportList​(ExporterContext context,
                             java.lang.Object primaryObject)
                      throws java.lang.Exception
        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:
        java.lang.Exception - If we are unable to create a Block instance.