Interface PageRedirectSupplier

All Known Implementing Classes:
AbstractPageRedirectSupplier, CategoryPageRedirectSupplier, ContentPageRedirectSupplier, EmailPageRedirectSupplier, ProductPageRedirectSupplier

public interface PageRedirectSupplier
Interface responsible for indicating whether to redirect the request or not and providing the redirect URL if applicable.
  • Method Summary

    Modifier and Type
    Method
    Description
    Predicate to test if a given page model matches the page type supplier.
    getRedirectUrl(javax.servlet.http.HttpServletRequest request, PreviewDataModel previewData)
    Constructs the redirect url given the http servlet request and the preview data.
    boolean
    shouldRedirect(javax.servlet.http.HttpServletRequest request, PreviewDataModel previewData)
    Determines whether to redirect the request depending upon the logic in supplier.
  • Method Details

    • getConstrainedBy

      Predicate<ItemModel> getConstrainedBy()
      Predicate to test if a given page model matches the page type supplier.
      Returns:
      true if the supplier exists; false otherwise.
    • shouldRedirect

      boolean shouldRedirect(javax.servlet.http.HttpServletRequest request, PreviewDataModel previewData)
      Determines whether to redirect the request depending upon the logic in supplier.
      Parameters:
      request - - the http request
      previewData - - the preview data
      Returns:
      true if it needs to redirect the request; false otherwise.
    • getRedirectUrl

      String getRedirectUrl(javax.servlet.http.HttpServletRequest request, PreviewDataModel previewData)
      Constructs the redirect url given the http servlet request and the preview data.
      Parameters:
      request - - the http servlet request
      previewData - - the preview data
      Returns:
      the redirect url