Interface TemplateTypeAware


public interface TemplateTypeAware
  • Method Summary

    Modifier and Type
    Method
    Description
    getExpectedTemplateName(jakarta.servlet.http.HttpServletRequest request)
    If a custom handler is written and it knows the eventual template name, then it should return the template name when this method is called.
    getTemplateType(jakarta.servlet.http.HttpServletRequest request)
    If a custom handler is written and it knows the eventual template name, then it should return the TemplateType when this method is called.
  • Method Details

    • getExpectedTemplateName

      String getExpectedTemplateName(jakarta.servlet.http.HttpServletRequest request)
      If a custom handler is written and it knows the eventual template name, then it should return the template name when this method is called. This method will always be called after #getBroadleafHandlerInternal(HttpServletRequest) and only if the Handler was able to handle the request (e.g. it returns a non-null value from #getBroadleafHandlerInternal(HttpServletRequest).

      Listed as expected because the HandlerMapping is making a call before the controller logic has been processed. The controller may send the user somewhere else (e.g. an error page, etc.) in which case, the expected template won't be the actual destination.

      Parameters:
      request -
      Returns:
      Throws:
      Exception
    • getTemplateType

      TemplateType getTemplateType(jakarta.servlet.http.HttpServletRequest request)
      If a custom handler is written and it knows the eventual template name, then it should return the TemplateType when this method is called. This method will always be called after #getBroadleafHandlerInternal(HttpServletRequest) and only if the Handler was able to handle the request (e.g. it returns a non-null value from #getBroadleafHandlerInternal(HttpServletRequest).
      Parameters:
      request -
      Returns:
      Throws:
      Exception