Package org.spincast.core.exceptions
Class RedirectException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.spincast.core.exceptions.RedirectException
- All Implemented Interfaces:
Serializable
Exception that will immediately send redirection headers.
Any remaining handlers will be skipped except for *after* filters.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionRedirects to the current URL.RedirectException
(String newUrl) RedirectException
(String newUrl, boolean redirectPermanently) RedirectException
(String newUrl, boolean redirectPermanently, FlashMessageLevel flashMessageType, String flashMessageTex) Redirect with a Flash message.RedirectException
(String newUrl, boolean redirectPermanently, FlashMessageLevel flashMessageType, String flashMessageTex, JsonObject flashMessageVariables) Redirect with a Flash message.protected
RedirectException
(String newUrl, boolean redirectPermanently, FlashMessage flashMessage, FlashMessageLevel flashMessageType, String flashMessageText, JsonObject flashMessageVariables) RedirectException
(String newUrl, FlashMessage flashMessage) Redirect with a Flash message.RedirectException
(String newUrl, FlashMessageLevel flashMessageType, String flashMessageTex) Redirect with a Flash message.RedirectException
(String newUrl, FlashMessageLevel flashMessageType, String flashMessageTex, JsonObject flashMessageVariables) Redirect with a Flash message.RedirectException
(FlashMessage flashMessage) Redirects to the current URL with a Flash message.RedirectException
(FlashMessageLevel flashMessageType, String flashMessageTex) Redirects to the current URL with a Flash message.RedirectException
(FlashMessageLevel flashMessageType, String flashMessageTex, JsonObject flashMessageVariables) Redirects to the current URL with a Flash message. -
Method Summary
Modifier and TypeMethodDescriptionCan be null.Can be null.Can be null.Can be null.The new route to redirect to.boolean
Is this a temporary or permanent redirection?Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RedirectException
public RedirectException()Redirects to the current URL. -
RedirectException
Redirects to the current URL with a Flash message. -
RedirectException
Redirects to the current URL with a Flash message. -
RedirectException
public RedirectException(FlashMessageLevel flashMessageType, String flashMessageTex, JsonObject flashMessageVariables) Redirects to the current URL with a Flash message. -
RedirectException
- Parameters:
newUrl
- The new route to redirect to (not permanently). This can be a full URL or a relative path (+ a potential queryString)
-
RedirectException
Redirect with a Flash message.- Parameters:
newUrl
- The new route to redirect to (not permanently). This can be a full URL or a relative path (+ a potential queryString)
-
RedirectException
Redirect with a Flash message.- Parameters:
newUrl
- The new route to redirect to (not permanently). This can be a full URL or a relative path (+ a potential queryString)
-
RedirectException
public RedirectException(String newUrl, FlashMessageLevel flashMessageType, String flashMessageTex, JsonObject flashMessageVariables) Redirect with a Flash message.- Parameters:
newUrl
- The new route to redirect to (not permanently). This can be a full URL or a relative path (+ a potential queryString)
-
RedirectException
- Parameters:
newUrl
- The new route to redirect to. This can be a full URL or a relative path (+ a potential queryString)redirectPermanently
- Is this a temporary or permanent redirection?
-
RedirectException
public RedirectException(String newUrl, boolean redirectPermanently, FlashMessageLevel flashMessageType, String flashMessageTex) Redirect with a Flash message.- Parameters:
newUrl
- The new route to redirect to (not permanently). This can be a full URL or a relative path (+ a potential queryString)redirectPermanently
- Is this a temporary or permanent redirection?
-
RedirectException
public RedirectException(String newUrl, boolean redirectPermanently, FlashMessageLevel flashMessageType, String flashMessageTex, JsonObject flashMessageVariables) Redirect with a Flash message.- Parameters:
newUrl
- The new route to redirect to (not permanently). This can be a full URL or a relative path (+ a potential queryString)redirectPermanently
- Is this a temporary or permanent redirection?
-
RedirectException
protected RedirectException(String newUrl, boolean redirectPermanently, FlashMessage flashMessage, FlashMessageLevel flashMessageType, String flashMessageText, JsonObject flashMessageVariables) - Parameters:
newUrl
- The new route to redirect to. This can be a full URL or a relative path (+ a potential queryString)redirectPermanently
- Is this a temporary or permanent redirection?flashMessage
- a Flash message to display on the target url?
-
-
Method Details
-
getNewUrl
The new route to redirect to. This can be a full URL or a relative path (+ a potential queryString) -
isRedirectPermanently
public boolean isRedirectPermanently()Is this a temporary or permanent redirection? -
getFlashMessage
Can be null. -
getFlashMessageType
Can be null. -
getFlashMessageText
Can be null. -
getFlashMessageVariables
Can be null.
-