Class ForcedRedirectException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.helger.xservlet.forcedredirect.ForcedRedirectException
-
- All Implemented Interfaces:
Serializable
public class ForcedRedirectException extends RuntimeException
This is a hack to allow for easy POST/Redirect/GET pattern implementation.- Since:
- 9.0.0
- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_MENU_ITEM_ID
-
Constructor Summary
Constructors Constructor Description ForcedRedirectException(String sSourceMenuItemID, com.helger.commons.url.ISimpleURL aRedirectTargetURL, Serializable aContent)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializablegetContent()com.helger.commons.url.ISimpleURLgetRedirectTargetURL()StringgetSourceMenuItemID()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
DEFAULT_MENU_ITEM_ID
public static final String DEFAULT_MENU_ITEM_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ForcedRedirectException
public ForcedRedirectException(@Nonnull @Nonempty String sSourceMenuItemID, @Nonnull com.helger.commons.url.ISimpleURL aRedirectTargetURL, @Nullable Serializable aContent)
Constructor- Parameters:
sSourceMenuItemID- The source menu item ID that triggered the PRG.aRedirectTargetURL- The redirect target URL. May not benull.aContent- The additional content to be displayed upon the next get. May benull. Usually this is anIHCNodebut this class is not accessible from here!
-
-
Method Detail
-
getSourceMenuItemID
@Nonnull @Nonempty public String getSourceMenuItemID()
- Returns:
- The source menu item ID that triggered the PRG as specified in the
constructor. Never
null.
-
getRedirectTargetURL
@Nonnull public com.helger.commons.url.ISimpleURL getRedirectTargetURL()
- Returns:
- The redirect target URL as specified in the constructor. Never
null.
-
getContent
@Nullable public Serializable getContent()
- Returns:
- The content to be displayed when the GET is executed. May be
null. Usually this is anIHCNodebut this class is not accessible from here!
-
-