Class 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
    • 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 be null.
        aContent - The additional content to be displayed upon the next get. May be null. Usually this is an IHCNode but 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 an IHCNode but this class is not accessible from here!