Class ContentTool

  • All Implemented Interfaces:
    ApplicationTool

    public class ContentTool
    extends Object
    implements ApplicationTool
    Terribly simple tool to translate URIs into Turbine Links. Equivalent to URIUtils.getAbsoluteLink() in a pull tool.

    If you're missing any routines from the 'old' $content tool concerning path_info or query data, you did use the wrong tool then. You should've used the TemplateLink tool which should be available as "$link" in your context.

    This is an application pull tool for the template system. You should not use it in a normal application!

    Version:
    $Id$
    Author:
    Henning P. Schmiedehausen, Peter Courcoux
    • Method Detail

      • init

        public void init​(Object data)
        This will initialize a ContentTool object that was constructed with the default constructor (ApplicationTool method).
        Specified by:
        init in interface ApplicationTool
        Parameters:
        data - assumed to be a PipelineData object
      • getURI

        public String getURI​(String path)
        Returns the Turbine URI of a given Path
        Parameters:
        path - The path to translate
        Returns:
        Turbine translated absolute path
      • getAbsoluteURI

        public String getAbsoluteURI​(String path)
        Returns the Turbine URI of a given Path. The result is always an absolute path starting with the server scheme (http/https).
        Parameters:
        path - The path to translate
        Returns:
        Turbine translated absolute path
      • getRelativeURI

        public String getRelativeURI​(String path)
        Returns the Turbine URI of a given Path. The result is always relative to the context of the application.
        Parameters:
        path - The path to translate
        Returns:
        Turbine translated absolute path