Interface IncludeEventHandler

  • All Superinterfaces:
    EventHandler
    All Known Implementing Classes:
    IncludeNotFound, IncludeRelativePath

    public interface IncludeEventHandler
    extends EventHandler
    Event handler for include type directives (e.g. #include(), #parse()) Allows the developer to modify the path of the resource returned.
    Since:
    1.5
    Version:
    $Id: IncludeEventHandler.java 685685 2008-08-13 21:43:27Z nbubna $
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String includeEvent​(java.lang.String includeResourcePath, java.lang.String currentResourcePath, java.lang.String directiveName)
      Called when an include-type directive is encountered ( #include or #parse).
    • Method Detail

      • includeEvent

        java.lang.String includeEvent​(java.lang.String includeResourcePath,
                                      java.lang.String currentResourcePath,
                                      java.lang.String directiveName)
        Called when an include-type directive is encountered ( #include or #parse). May modify the path of the resource to be included or may block the include entirely. All the registered IncludeEventHandlers are called unless null is returned. If none are registered the template at the includeResourcePath is retrieved.
        Parameters:
        includeResourcePath - the path as given in the include directive.
        currentResourcePath - the path of the currently rendering template that includes the include directive.
        directiveName - name of the directive used to include the resource. (With the standard directives this is either "parse" or "include").
        Returns:
        a new resource path for the directive, or null to block the include from occurring.