Package org.mycore.viewer.configuration
Class MCRViewerConfigurationBuilder
java.lang.Object
org.mycore.viewer.configuration.MCRViewerConfigurationBuilder
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 Summary
Modifier and TypeMethodDescriptionbuild
(jakarta.servlet.http.HttpServletRequest request) Creates a new configuration builder.epub
(jakarta.servlet.http.HttpServletRequest request) Builds the default pdf configuration without any plugins.get()
Gets the configuration.iiif
(jakarta.servlet.http.HttpServletRequest request) Builds the default mets configuration without any plugins.mets
(jakarta.servlet.http.HttpServletRequest request) Builds the default mets configuration without any plugins.metsAndPlugins
(jakarta.servlet.http.HttpServletRequest request) Builds the mets configuration with the metadata, piwik and logo plugin.mixin
(MCRViewerConfiguration configuration) Mix in the configuration into the builder.static void
mixin
(MCRViewerConfiguration conf1, MCRViewerConfiguration conf2) Mix in the second configuration into the first.pdf
(jakarta.servlet.http.HttpServletRequest request) Builds the default pdf configuration without any plugins.plugins
(jakarta.servlet.http.HttpServletRequest request) Builds just the plugins (metadata, piwik, logo).
-
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
Gets the configuration. -
mixin
Mix in the second configuration into the first. -
build
Creates a new configuration builder.- Parameters:
request
- the servlet request- Returns:
- a new configuration builder instance.
-
mets
Builds the default mets configuration without any plugins. -
iiif
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
Builds the default pdf configuration without any plugins. -
epub
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).
-