Package org.craftercms.engine.macro.impl
Class MacroResolverImpl
- java.lang.Object
-
- org.craftercms.engine.macro.impl.MacroResolverImpl
-
- All Implemented Interfaces:
MacroResolver
public class MacroResolverImpl extends Object implements MacroResolver
Default implementation ofMacroResolver
. Uses a chain ofMacro
s to resolve the macros. After that, the specified additional macro values are replaced.- Author:
- Alfonso Vásquez
-
-
Constructor Summary
Constructors Constructor Description MacroResolverImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
resolveMacros(String str)
Resolve the macros found in the string.String
resolveMacros(String str, Map<String,?> macroValues)
Resolve the macros found in the string.void
setMacros(List<Macro> macros)
-
-
-
Method Detail
-
resolveMacros
public String resolveMacros(String str)
Description copied from interface:MacroResolver
Resolve the macros found in the string.- Specified by:
resolveMacros
in interfaceMacroResolver
- Parameters:
str
- the string with the macros- Returns:
- the resolved string
-
resolveMacros
public String resolveMacros(String str, Map<String,?> macroValues)
Description copied from interface:MacroResolver
Resolve the macros found in the string.- Specified by:
resolveMacros
in interfaceMacroResolver
- Parameters:
str
- the string with the macrosmacroValues
- additional macros values- Returns:
- the resolved string
-
-