Class ErrorPageDescriptor

  • All Implemented Interfaces:
    Serializable

    public class ErrorPageDescriptor
    extends Object
    implements Serializable
    Objects exhiniting this interface represent an error page and the exception type or error code that will cause the redirect from the web container.
    Author:
    Danny Coward
    See Also:
    Serialized Form
    • Constructor Detail

      • ErrorPageDescriptor

        public ErrorPageDescriptor()
        The default constructor.
      • ErrorPageDescriptor

        public ErrorPageDescriptor​(int errorCode,
                                   String location)
        Constructor for error code to error page mapping.
      • ErrorPageDescriptor

        public ErrorPageDescriptor​(String exceptionType,
                                   String location)
        Constructor for Java exception type to error page mapping.
    • Method Detail

      • getErrorCode

        public int getErrorCode()
        Return the error code. -1 if none.
      • setErrorCode

        public void setErrorCode​(int errorCode)
        Sets the error code.
      • getErrorSignifierAsString

        public String getErrorSignifierAsString()
        If there is an exception type, then the exception type is returned. Otherwise, if the error code is not -1, then the error code is returned as a string. If the error code is -1, then nul is returned.
      • setErrorSignifierAsString

        public void setErrorSignifierAsString​(String errorSignifier)
        Sets the error code if the argument is parsable as an int, or the exception type else.
      • getExceptionType

        public String getExceptionType()
        Return the exception type or the empty string if none.
      • setExceptionType

        public void setExceptionType​(String exceptionType)
        Sets the exception type.
      • getLocation

        public String getLocation()
        Return the page to map to
      • setLocation

        public void setLocation​(String location)