Interface PageRedirectSupplier

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.function.Predicate<ItemModel> getConstrainedBy()
      Predicate to test if a given page model matches the page type supplier.
      java.lang.String 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 Detail

      • getConstrainedBy

        java.util.function.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

        java.lang.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