Class AbstractMultiObjectExport

    • Constructor Detail

      • AbstractMultiObjectExport

        public AbstractMultiObjectExport()
    • Method Detail

      • disambiguateNames

        protected String[] disambiguateNames​(String[] names)
        Ensures that the names are unique.
        Parameters:
        names - the names
        Returns:
        the unique names
      • check

        protected String check​(String[] names,
                               Object[] objects)
        Checks the data.
        Parameters:
        names - the names for the objects
        objects - the objects
        Returns:
        null if successful, otherwise error message
      • pruneExporters

        protected List<AbstractObjectExporter> pruneExporters​(List<AbstractObjectExporter> exporters)
        Prunes the list of exporters to use. Removes PlainTextExporter in favor of RenderedPlainTextExporter.
        Parameters:
        exporters - the exporters
        Returns:
        the updated list
      • determineExporters

        protected List<AbstractObjectExporter> determineExporters​(String name,
                                                                  Object obj,
                                                                  MessageCollection errors)
        Determines the exporters to use for the object.
        Parameters:
        name - the name of the object
        obj - the object to determine the exporter for
        errors - for storing errors
        Returns:
        the exporters
      • determineExtension

        protected String determineExtension​(AbstractObjectExporter exporter)
        Returns the extension for the given exporter.
        Parameters:
        exporter - the exporter to get the extension for
        Returns:
        the extension to use
      • doExport

        protected abstract String doExport​(String[] names,
                                           Object[] objects)
        Performs the actual export of the objects using the given names.
        Parameters:
        names - the names for the objects
        objects - the objects
        Returns:
        null if successful, otherwise error message
      • export

        public String export​(String[] names,
                             Object[] objects)
        Exports the objects using the given names.
        Parameters:
        names - the names for the objects
        objects - the objects
        Returns:
        null if successful, otherwise error message