Package liqp.filters

Class Relative_Url

Direct Known Subclasses:
Absolute_Url

public class Relative_Url extends Filter
This filter requires baseurl parameter that will be used as base for building relative url.
  • Field Details

  • Constructor Details

    • Relative_Url

      public Relative_Url()
  • Method Details

    • apply

      public Object apply(Object value, TemplateContext context, Object... params)
      Description copied from class: Filter
      Applies the filter on the 'value', with the given 'context'.
      Overrides:
      apply in class Filter
      Parameters:
      value - the string value `AAA` in: `{{ 'AAA' | f:1,2,3 }}`
      context - the template context.
      params - the values [1, 2, 3] in: `{{ 'AAA' | f:1,2,3 }}`
      Returns:
      the result of the filter.
    • getRelativeUrl

      protected String getRelativeUrl(TemplateContext context, String baseUrl, String valAsString)
    • objectToMap

      protected Map<String,Object> objectToMap(Object configRoot, TemplateContext context)
    • isValidAbsoluteUrl

      protected boolean isValidAbsoluteUrl(String valAsString)