From 825c81002bd150336d61b9ee33577208441a3768 Mon Sep 17 00:00:00 2001 From: Graham Triggs Date: Wed, 25 May 2016 18:38:33 +0100 Subject: [PATCH] [VIVO-1245] Cleanup of MenuManagementDataUtils --- .../menuManagement/MenuManagementDataUtils.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/utils/menuManagement/MenuManagementDataUtils.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/utils/menuManagement/MenuManagementDataUtils.java index 9e7ebb44a..67553827a 100644 --- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/utils/menuManagement/MenuManagementDataUtils.java +++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/utils/menuManagement/MenuManagementDataUtils.java @@ -16,13 +16,23 @@ import org.apache.commons.logging.LogFactory; public class MenuManagementDataUtils { private static final Log log = LogFactory.getLog(MenuManagementDataUtils.class); + private static IMenuManagementDataUtils impl = null; + //Data that is to be returned to template that does not involve data getters //e.g. what are the current class groups, etc. public static void includeRequiredSystemData(ServletContext context, Map templateData) { - - + if (impl != null) { + impl.includeRequiredSystemData(context, templateData); + } + } + + public static void setImplementation(IMenuManagementDataUtils impl) { + MenuManagementDataUtils.impl = impl; } + public interface IMenuManagementDataUtils { + public void includeRequiredSystemData(ServletContext context, Map templateData); + } } \ No newline at end of file