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_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_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_NAMES
MACRO_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.
|
addDynamicMacro, addMacro, formatMacro, isKeepEmptyMacros, isMacro, isMacro, localizedKeyMacro, newInstance, newWorkplaceLocaleResolver, resolveMacros, resolveMacros, setAdditionalMacros, setCmsObject, setJspPageContext, setKeepEmptyMacros, setMessages, setParameterMap, setResourceName, stripMacro, toFunction
public static final java.lang.String NO_PREFIX
public static final java.util.regex.Pattern NO_PREFIX_PATTERN
public static final java.lang.String PAGE_NAV
public static final java.lang.String PAGE_TITLE
public static final java.lang.String PREFIX_VALUE
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 lookupprotected 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 uppublic java.lang.String getMacroValue(java.lang.String macro)
I_CmsMacroResolver
null
if the macro could not be resolved.getMacroValue
in interface I_CmsMacroResolver
getMacroValue
in class CmsMacroResolver
macro
- 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_CmsMacroResolver
resolveMacros
in class CmsMacroResolver
input
- the input to resolve the macros inCmsMacroResolver.resolveMacros(java.lang.String)