public class CmsGalleryNameMacroResolver extends CmsMacroResolver
This supports the following special macros:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NO_PREFIX
Macro prefix.
|
static java.util.regex.Pattern |
NO_PREFIX_PATTERN
Pattern used to match the no_prefix macro.
|
static java.lang.String |
PAGE_NAV
Macro name.
|
static java.lang.String |
PAGE_TITLE
Macro name.
|
static java.lang.String |
PREFIX_STRINGTEMPLATE
Prefix for the stringtemplate macro.
|
static java.lang.String |
PREFIX_VALUE
Macro prefix.
|
KEY_ATTRIBUTE, KEY_CONTEXT_PATH, KEY_CURRENT_ORGUNIT_DESCRIPTION, KEY_CURRENT_ORGUNIT_FQN, KEY_CURRENT_TIME, KEY_CURRENT_USER_CITY, KEY_CURRENT_USER_COUNTRY, KEY_CURRENT_USER_DISPLAYNAME, KEY_CURRENT_USER_EMAIL, KEY_CURRENT_USER_FIRSTNAME, KEY_CURRENT_USER_FULLNAME, KEY_CURRENT_USER_INSTITUTION, KEY_CURRENT_USER_LASTLOGIN, KEY_CURRENT_USER_LASTNAME, KEY_CURRENT_USER_NAME, KEY_CURRENT_USER_STREET, KEY_CURRENT_USER_ZIP, KEY_LOCALIZED_PREFIX, KEY_OPENCMS, KEY_PAGE_CONTEXT, KEY_PROJECT_ID, KEY_PROPERTY, KEY_PROPERTY_ELEMENT, KEY_RANDOM_ID, KEY_REQUEST_ENCODING, KEY_REQUEST_FOLDER, KEY_REQUEST_LOCALE, KEY_REQUEST_PARAM, KEY_REQUEST_SITEROOT, KEY_REQUEST_URI, KEY_VALIDATION_PATH, KEY_VALIDATION_REGEX, KEY_VALIDATION_VALUE, m_additionalMacros, m_cms, m_jspPageContext, m_keepEmptyMacros, m_messages, m_parameterMap, m_resourceName, VALUE_NAMESMACRO_DELIMITER, MACRO_DELIMITER_OLD, MACRO_END, MACRO_END_OLD, MACRO_START, MACRO_START_OLD| Constructor and Description |
|---|
CmsGalleryNameMacroResolver(CmsObject cms,
A_CmsXmlDocument content,
java.util.Locale locale)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getContainerPageProperty(java.lang.String propName)
Gets the given property of the container page referencing this content.
|
java.lang.String |
getMacroValue(java.lang.String macro)
Resolves a single macro to the macro value, returns
null if the macro could not be resolved. |
java.lang.String |
resolveMacros(java.lang.String input)
Resolves the macros in the given input.
|
void |
setStringTemplateSource(java.util.function.Function<java.lang.String,java.lang.String> stringtemplateSource) |
addDynamicMacro, addMacro, copyAndResolveMacro, copyAndResolveMacro, copyAndResolveMacro, formatMacro, getBundleMapFromResources, isKeepEmptyMacros, isMacro, isMacro, localizedKeyMacro, newInstance, newWorkplaceLocaleResolver, resolveMacros, resolveMacros, setAdditionalMacros, setCmsObject, setJspPageContext, setKeepEmptyMacros, setMessages, setParameterMap, setResourceName, stripMacro, toFunctionpublic static final java.lang.String PREFIX_VALUE
public static final java.lang.String PAGE_TITLE
public static final java.lang.String PAGE_NAV
public static final java.lang.String NO_PREFIX
public static final java.util.regex.Pattern NO_PREFIX_PATTERN
public static final java.lang.String PREFIX_STRINGTEMPLATE
public CmsGalleryNameMacroResolver(CmsObject cms, A_CmsXmlDocument content, java.util.Locale locale)
cms - the CMS context to use for VFS operationscontent - the content to use for macro value lookuplocale - the locale to use for macro value lookuppublic java.lang.String getMacroValue(java.lang.String macro)
I_CmsMacroResolvernull if the macro could not be resolved.getMacroValue in interface I_CmsMacroResolvergetMacroValue in class CmsMacroResolvermacro - the macro to resolvenull if the macro could not be resolvedCmsMacroResolver.getMacroValue(java.lang.String)public java.lang.String resolveMacros(java.lang.String input)
CmsMacroResolver
Calls until no more macros can
be resolved in the input. This way "nested" macros in the input are resolved as well.CmsMacroResolver.resolveMacros(String)
resolveMacros in interface I_CmsMacroResolverresolveMacros in class CmsMacroResolverinput - the input to resolve the macros inCmsMacroResolver.resolveMacros(java.lang.String)public void setStringTemplateSource(java.util.function.Function<java.lang.String,java.lang.String> stringtemplateSource)
protected java.lang.String getContainerPageProperty(java.lang.String propName)
If more than one container page with the same locale reference this content, the empty string will be returned.
propName - the property name to look up