Class MarkupTemplateContext

java.lang.Object
io.karatelabs.markup.MarkupTemplateContext
All Implemented Interfaces:
MarkupScope, org.thymeleaf.context.IContext, org.thymeleaf.context.IEngineContext, org.thymeleaf.context.IExpressionContext, org.thymeleaf.context.ITemplateContext

public class MarkupTemplateContext extends Object implements org.thymeleaf.context.IEngineContext, MarkupScope
  • Method Details

    • set

      public void set(String name, Object value)
      MarkupScope write-side. Stores value under name in the per-render underscore map (same store as _.<name> = value from JS). Backs context.set(name, value).
      Specified by:
      set in interface MarkupScope
    • lookup

      public Object lookup(String name)
      MarkupScope implementation. Looks up name in the underscore map first, then the wrapped Thymeleaf scope. Returns the bound non-null value if found, else null. Used by context.get(name, default?) (see MarkupContext.jsGet(java.lang.String)).
      Specified by:
      lookup in interface MarkupScope
    • evalLocalAsObject

      public Object evalLocalAsObject(String src)
    • evalLocal

      public Object evalLocal(String src)
    • increaseLevel

      public void increaseLevel()
      Specified by:
      increaseLevel in interface org.thymeleaf.context.IEngineContext
    • setVariable

      public void setVariable(String name, Object value)
      Specified by:
      setVariable in interface org.thymeleaf.context.IEngineContext
    • setVariables

      public void setVariables(Map<String,Object> variables)
      Specified by:
      setVariables in interface org.thymeleaf.context.IEngineContext
    • removeVariable

      public void removeVariable(String name)
      Specified by:
      removeVariable in interface org.thymeleaf.context.IEngineContext
    • setTemplateData

      public void setTemplateData(org.thymeleaf.engine.TemplateData template)
      Specified by:
      setTemplateData in interface org.thymeleaf.context.IEngineContext
    • decreaseLevel

      public void decreaseLevel()
      Specified by:
      decreaseLevel in interface org.thymeleaf.context.IEngineContext
    • containsVariable

      public boolean containsVariable(String name)
      Specified by:
      containsVariable in interface org.thymeleaf.context.IContext
    • getVariableNames

      public Set<String> getVariableNames()
      Specified by:
      getVariableNames in interface org.thymeleaf.context.IContext
    • getVariable

      public Object getVariable(String name)
      Specified by:
      getVariable in interface org.thymeleaf.context.IContext
    • isVariableLocal

      public boolean isVariableLocal(String name)
      Specified by:
      isVariableLocal in interface org.thymeleaf.context.IEngineContext
    • setSelectionTarget

      public void setSelectionTarget(Object selectionTarget)
      Specified by:
      setSelectionTarget in interface org.thymeleaf.context.IEngineContext
    • setInliner

      public void setInliner(org.thymeleaf.inline.IInliner inliner)
      Specified by:
      setInliner in interface org.thymeleaf.context.IEngineContext
    • setElementTag

      public void setElementTag(org.thymeleaf.model.IProcessableElementTag elementTag)
      Specified by:
      setElementTag in interface org.thymeleaf.context.IEngineContext
    • getElementStackAbove

      public List<org.thymeleaf.model.IProcessableElementTag> getElementStackAbove(int contextLevel)
      Specified by:
      getElementStackAbove in interface org.thymeleaf.context.IEngineContext
    • level

      public int level()
      Specified by:
      level in interface org.thymeleaf.context.IEngineContext
    • getTemplateData

      public org.thymeleaf.engine.TemplateData getTemplateData()
      Specified by:
      getTemplateData in interface org.thymeleaf.context.ITemplateContext
    • getTemplateMode

      public org.thymeleaf.templatemode.TemplateMode getTemplateMode()
      Specified by:
      getTemplateMode in interface org.thymeleaf.context.ITemplateContext
    • getTemplateStack

      public List<org.thymeleaf.engine.TemplateData> getTemplateStack()
      Specified by:
      getTemplateStack in interface org.thymeleaf.context.ITemplateContext
    • getElementStack

      public List<org.thymeleaf.model.IProcessableElementTag> getElementStack()
      Specified by:
      getElementStack in interface org.thymeleaf.context.ITemplateContext
    • getTemplateResolutionAttributes

      public Map<String,Object> getTemplateResolutionAttributes()
      Specified by:
      getTemplateResolutionAttributes in interface org.thymeleaf.context.ITemplateContext
    • getModelFactory

      public org.thymeleaf.model.IModelFactory getModelFactory()
      Specified by:
      getModelFactory in interface org.thymeleaf.context.ITemplateContext
    • hasSelectionTarget

      public boolean hasSelectionTarget()
      Specified by:
      hasSelectionTarget in interface org.thymeleaf.context.ITemplateContext
    • getSelectionTarget

      public Object getSelectionTarget()
      Specified by:
      getSelectionTarget in interface org.thymeleaf.context.ITemplateContext
    • getInliner

      public org.thymeleaf.inline.IInliner getInliner()
      Specified by:
      getInliner in interface org.thymeleaf.context.ITemplateContext
    • getMessage

      public String getMessage(Class<?> origin, String key, Object[] messageParameters, boolean useAbsent)
      Specified by:
      getMessage in interface org.thymeleaf.context.ITemplateContext
    • buildLink

      public String buildLink(String base, Map<String,Object> parameters)
      Specified by:
      buildLink in interface org.thymeleaf.context.ITemplateContext
    • getIdentifierSequences

      public org.thymeleaf.context.IdentifierSequences getIdentifierSequences()
      Specified by:
      getIdentifierSequences in interface org.thymeleaf.context.ITemplateContext
    • getConfiguration

      public org.thymeleaf.IEngineConfiguration getConfiguration()
      Specified by:
      getConfiguration in interface org.thymeleaf.context.IExpressionContext
    • getExpressionObjects

      public org.thymeleaf.expression.IExpressionObjects getExpressionObjects()
      Specified by:
      getExpressionObjects in interface org.thymeleaf.context.IExpressionContext
    • getLocale

      public Locale getLocale()
      Specified by:
      getLocale in interface org.thymeleaf.context.IContext