Interface CustomPublish


public interface CustomPublish
This is used to publish content from a repository in some custom way. The publish is controlled through a CustomPublishConfig which is configured with the content to publish and what to do with the resulting XML files (e.g. transforming it with XSLT).
  • Method Details

    • createConfigFactory

      CustomPublishConfigFactory createConfigFactory()
      Creates a factory for creating new configurations.
      Returns:
      A configuration factory.
    • readConfig

      A complete custom publish profile can be bundled as a zip archive containing the publish configuration in an entry called "config.xml", together with any other resources the publish might need. This method extracts the content of "config.xml" from the archive and returns the corresponding configuration object.
      Parameters:
      data - The zip archive data.
      Returns:
      A configuration object read from the "config.xml" entry of the zip archive.
      Throws:
      IOException - If an error occurs.
      CustomPublishConfigException - If an error occurs.
    • run

      void run(CustomPublishConfig config, Collection<MTLanguage> languages, ProgressCallback progress, UploadProfile target, BiFunction<Path,String,Boolean> removeExistingFilter, Map<String,String> transformParameters, MTColorScheme colorScheme, boolean notifySubscribers, PublishResource... resource) throws CustomPublishException, IOException
      Runs a custom publish.
      Parameters:
      config - The configuration to use for the publish.
      languages - The languages to include in the publish.
      progress - A callback that will get updated as the publish proceeds.
      target - A target.
      removeExistingFilter - A function.
      transformParameters - Any transform parameters that should be sent to the later transformation steps.
      colorScheme - The color scheme to use for published models.
      notifySubscribers - True to notify subs, false otherwise.
      resource - An var args of resources.
      Throws:
      CustomPublishException - If an error occurs.
      IOException - If an error occurs.