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 TypeMethodDescriptionPredicate 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.booleanshouldRedirect(javax.servlet.http.HttpServletRequest request, PreviewDataModel previewData) Determines whether to redirect the request depending upon the logic in supplier.
-
Method Details
-
getConstrainedBy
Predicate to test if a given page model matches the page type supplier.- Returns:
trueif the supplier exists;falseotherwise.
-
shouldRedirect
Determines whether to redirect the request depending upon the logic in supplier.- Parameters:
request- - the http requestpreviewData- - the preview data- Returns:
trueif it needs to redirect the request;falseotherwise.
-
getRedirectUrl
Constructs the redirect url given the http servlet request and the preview data.- Parameters:
request- - the http servlet requestpreviewData- - the preview data- Returns:
- the redirect url
-