Class MCRViewerConfigurationBuilder

java.lang.Object
org.mycore.viewer.configuration.MCRViewerConfigurationBuilder

public class MCRViewerConfigurationBuilder extends Object
Use this class to build your MCRViewerConfiguration. You can use mets(HttpServletRequest) or pdf(HttpServletRequest) as entry point and use mixin(MCRViewerConfiguration) to append additional configuration.
Author:
Matthias Eichner
  • Method Details

    • mixin

      Mix in the configuration into the builder. This overwrites properties and resources with the same name.
      Parameters:
      configuration - the configuration to mix in.
      Returns:
      same instance
    • get

      public MCRViewerConfiguration get()
      Gets the configuration.
    • mixin

      public static void mixin(MCRViewerConfiguration conf1, MCRViewerConfiguration conf2)
      Mix in the second configuration into the first.
    • build

      public static MCRViewerConfigurationBuilder build(jakarta.servlet.http.HttpServletRequest request)
      Creates a new configuration builder.
      Parameters:
      request - the servlet request
      Returns:
      a new configuration builder instance.
    • mets

      public static MCRViewerConfigurationBuilder mets(jakarta.servlet.http.HttpServletRequest request)
      Builds the default mets configuration without any plugins.
    • iiif

      public static MCRViewerConfigurationBuilder iiif(jakarta.servlet.http.HttpServletRequest request)
      Builds the default mets configuration without any plugins.
    • metsAndPlugins

      public static MCRViewerConfigurationBuilder metsAndPlugins(jakarta.servlet.http.HttpServletRequest request)
      Builds the mets configuration with the metadata, piwik and logo plugin.
    • pdf

      public static MCRViewerConfigurationBuilder pdf(jakarta.servlet.http.HttpServletRequest request)
      Builds the default pdf configuration without any plugins.
    • epub

      public static MCRViewerConfigurationBuilder epub(jakarta.servlet.http.HttpServletRequest request)
      Builds the default pdf configuration without any plugins.
    • plugins

      public static MCRViewerConfigurationBuilder plugins(jakarta.servlet.http.HttpServletRequest request)
      Builds just the plugins (metadata, piwik, logo).