/** * @see org.opencms.util.I_CmsMacroResolver#resolveMacros(java.lang.String) */ public String resolveMacros(String input) { return CmsMacroResolver.resolveMacros(input, this); }
public String apply(String input) { return resolveMacros(input); } };
/** * @see org.opencms.util.I_CmsMacroResolver#resolveMacros(java.lang.String) */ public String resolveMacros(String input) { return CmsMacroResolver.resolveMacros(input, this); }
/** * Returns the direct edit include HTML to insert in the page beginning.<p> t * * @param params the parameters for the direct edit includes * * @return the direct edit include HTML to insert in the page beginning */ public String getDirectEditIncludes(CmsDirectEditParams params) { CmsMacroResolver resolver = prepareMacroResolverForIncludes(params); return resolver.resolveMacros(m_headerInclude); }
/** * Returns the substituted value for the given key and arguments from the configuration file.<p> * * @param key the key to get the value for * @param args the arguments that should be substituted * @return the substituted value for the given key and arguments */ protected String getConfigValue(String key, Object[] args) { String value = getConfigValue(key); CmsMacroResolver resolver = CmsMacroResolver.newInstance(); for (int i = 0; i < args.length; i++) { resolver.addMacro(String.valueOf(i), args[i].toString()); } return resolver.resolveMacros(value); }
/** * @see org.opencms.xml.content.I_CmsXmlContentHandler#getPreview(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, java.lang.String) */ public String getPreview(CmsObject cms, CmsXmlContent content, String resourcename) { CmsMacroResolver resolver = CmsMacroResolver.newInstance().setCmsObject(cms); resolver.addMacro(MACRO_PREVIEW_TEMPFILE, resourcename); return resolver.resolveMacros(m_previewLocation); }
/** * @see org.opencms.xml.content.I_CmsXmlContentHandler#getPreview(org.opencms.file.CmsObject, org.opencms.xml.content.CmsXmlContent, java.lang.String) */ public String getPreview(CmsObject cms, CmsXmlContent content, String resourcename) { CmsMacroResolver resolver = CmsMacroResolver.newInstance().setCmsObject(cms); resolver.addMacro(MACRO_PREVIEW_TEMPFILE, resourcename); return resolver.resolveMacros(m_previewLocation); }
/** * Returns the description of this organizational unit.<p> * * @param locale the locale * * @return the description of this organizational unit */ public String getDescription(Locale locale) { CmsMacroResolver macroResolver = new CmsMacroResolver(); macroResolver.setMessages(org.opencms.db.generic.Messages.get().getBundle(locale)); return macroResolver.resolveMacros(m_description); }
/** * Returns the description of this organizational unit.<p> * * @param locale the locale * * @return the description of this organizational unit */ public String getDescription(Locale locale) { CmsMacroResolver macroResolver = new CmsMacroResolver(); macroResolver.setMessages(org.opencms.db.generic.Messages.get().getBundle(locale)); return macroResolver.resolveMacros(m_description); }
/** * Returns the description of this organizational unit.<p> * * @param locale the locale * * @return the description of this organizational unit */ public String getDescription(Locale locale) { CmsMacroResolver macroResolver = new CmsMacroResolver(); macroResolver.setMessages(org.opencms.db.generic.Messages.get().getBundle(locale)); return macroResolver.resolveMacros(m_description); }
/** * @see org.opencms.xml.containerpage.I_CmsFormatterBean#getNiceName(Locale) */ @Override public String getNiceName(Locale locale) { if (locale == null) { return m_niceName; } CmsMacroResolver resolver = new CmsMacroResolver(); resolver.setMessages(OpenCms.getWorkplaceManager().getMessages(locale)); return resolver.resolveMacros(m_niceName); }
/** * @see org.opencms.ui.contextmenu.I_CmsContextMenuItem#getTitle(java.util.Locale) */ public String getTitle(Locale locale) { CmsMacroResolver resolver = new CmsMacroResolver(); resolver.setMessages(OpenCms.getWorkplaceManager().getMessages(locale)); if (m_title == null) { return ""; } return resolver.resolveMacros(m_title); }
/** * Returns the description of this organizational unit.<p> * * @param locale the locale * * @return the description of this organizational unit */ public String getDescription(Locale locale) { CmsMacroResolver macroResolver = new CmsMacroResolver(); macroResolver.setMessages(org.opencms.db.generic.Messages.get().getBundle(locale)); return macroResolver.resolveMacros(m_description); }
/** * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getHelpText(java.util.Locale) */ public String getHelpText(Locale locale) { return CmsMacroResolver.newInstance().setMessages( OpenCms.getWorkplaceManager().getMessages(locale)).resolveMacros(m_toolHandler.getHelpText()); }
/** * Returns the description of this organizational unit.<p> * * @param locale the locale * * @return the description of this organizational unit */ public String getDescription(Locale locale) { CmsMacroResolver macroResolver = new CmsMacroResolver(); macroResolver.setMessages(org.opencms.db.generic.Messages.get().getBundle(locale)); return macroResolver.resolveMacros((String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION)); }
/** * @see org.opencms.ui.apps.I_CmsWorkplaceAppConfiguration#getName(java.util.Locale) */ public String getName(Locale locale) { return CmsMacroResolver.newInstance().setMessages( OpenCms.getWorkplaceManager().getMessages(locale)).resolveMacros(m_toolHandler.getName()); }
/** * Returns the description of this organizational unit.<p> * * @param locale the locale * * @return the description of this organizational unit */ public String getDescription(Locale locale) { CmsMacroResolver macroResolver = new CmsMacroResolver(); macroResolver.setMessages(org.opencms.db.generic.Messages.get().getBundle(locale)); return macroResolver.resolveMacros((String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION)); }
/** * Substitutes the ${CONTEXT_NAME} and ${SERVLET_NAME} in a path with the real values.<p> * * @param path the path to substitute * @return path with real context values */ protected String insertContextStrings(String path) { // create a new macro resolver CmsMacroResolver resolver = CmsMacroResolver.newInstance(); // add special mappings for macros resolver.addMacro("CONTEXT_NAME", OpenCms.getSystemInfo().getContextPath()); resolver.addMacro("SERVLET_NAME", OpenCms.getSystemInfo().getServletPath()); // resolve the macros return resolver.resolveMacros(path); }
/** * Substitutes the ${CONTEXT_NAME} and ${SERVLET_NAME} in a path with the real values.<p> * * @param path the path to substitute * @return path with real context values */ protected String insertContextStrings(String path) { // create a new macro resolver CmsMacroResolver resolver = CmsMacroResolver.newInstance(); // add special mappings for macros resolver.addMacro("CONTEXT_NAME", OpenCms.getSystemInfo().getContextPath()); resolver.addMacro("SERVLET_NAME", OpenCms.getSystemInfo().getServletPath()); // resolve the macros return resolver.resolveMacros(path); }
/** * Gets the path to use for the authorization cookie, optionally resolving any macros used.<p> * * @param resolveMacros if true, macros should be resolved * @return the authorization cookie path */ public String getCookiePath(boolean resolveMacros) { String result = m_cookiePath; if (resolveMacros) { CmsMacroResolver resolver = new CmsMacroResolver(); // add special mappings for macros resolver.addMacro("CONTEXT_NAME", OpenCms.getSystemInfo().getContextPath()); resolver.addMacro("SERVLET_NAME", OpenCms.getSystemInfo().getServletPath()); result = resolver.resolveMacros(result); } return result; }