diff --git a/source/java/org/alfresco/web/app/Application.java b/source/java/org/alfresco/web/app/Application.java index c10a75e421..d2623ec4b0 100644 --- a/source/java/org/alfresco/web/app/Application.java +++ b/source/java/org/alfresco/web/app/Application.java @@ -76,6 +76,7 @@ public class Application private static String scriptsFolderName; private static String guestHomeFolderName; private static String websitesFolderName; + private static String contentFormsFolderName; /** * Private constructor to prevent instantiation of this class @@ -458,6 +459,22 @@ public class Application return getWebsitesFolderName(FacesContextUtils.getRequiredWebApplicationContext(context)); } + /** + * @return the WCM Content Forms folder name + */ + public static String getContentFormsFolderName(ServletContext context) + { + return getContentFormsFolderName(WebApplicationContextUtils.getRequiredWebApplicationContext(context)); + } + + /** + * @return the WCM Content Forms folder name + */ + public static String getContentFormsFolderName(FacesContext context) + { + return getContentFormsFolderName(FacesContextUtils.getRequiredWebApplicationContext(context)); + } + /** * Set the language locale for the current user context * @@ -879,6 +896,24 @@ public class Application return websitesFolderName; } + /** + * Returns the WCM Content Forms folder name + * + * @param context The Spring context + * @return The WCM Content Forms folder name + */ + private static String getContentFormsFolderName(WebApplicationContext context) + { + if (contentFormsFolderName == null) + { + ImporterBootstrap bootstrap = (ImporterBootstrap)context.getBean(BEAN_IMPORTER_BOOTSTRAP); + Properties configuration = bootstrap.getConfiguration(); + contentFormsFolderName = configuration.getProperty("spaces.content_forms.childname"); + } + + return contentFormsFolderName; + } + /** * Retrieves the configured error page for the application *