Class AbstractMacro

java.lang.Object
org.craftercms.engine.macro.impl.AbstractMacro
All Implemented Interfaces:
Macro, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
CookieMacro, FixedValueMacro, RequestParamMacro, RequestUriMacro, ScopeAttributeMacro, WebAppContextPathMacro, WebAppPathMacro

public abstract class AbstractMacro extends Object implements Macro, org.springframework.beans.factory.InitializingBean
Abstract Macro that provides a macro name attribute to hold the macro name (when the macro's name is variable) and the ability to skip the macro if the name is not contained in the specified string.
Author:
Alfonso Vásquez
  • Field Details

    • macroName

      protected String macroName
  • Constructor Details

    • AbstractMacro

      public AbstractMacro()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • getName

      public String getName()
      Specified by:
      getName in interface Macro
    • resolve

      public String resolve(String str)
      Specified by:
      resolve in interface Macro
    • createMacroName

      protected abstract String createMacroName()
    • getMacroValue

      protected abstract String getMacroValue(String str)