Class ErrorItem

  • All Implemented Interfaces:
    ErrorHandler

    public class ErrorItem
    extends Object
    implements ErrorHandler
    ErrorHandler implementation for dynamic error items
    • Constructor Detail

      • ErrorItem

        public ErrorItem​(String message,
                         String description,
                         long errorCode,
                         int statusCode,
                         boolean stackTrace)
      • ErrorItem

        public ErrorItem()
      • ErrorItem

        public ErrorItem​(String message,
                         String description,
                         long errorCode,
                         int statusCode)
    • Method Detail

      • setErrorCode

        public void setErrorCode​(long errorCode)
      • setDescription

        public void setDescription​(String description)
      • setMessage

        public void setMessage​(String message)
      • setStatusCode

        public void setStatusCode​(int statusCode)
      • getErrorCode

        public long getErrorCode()
        Description copied from interface: ErrorHandler
        Get error code that defined in the enum
        Specified by:
        getErrorCode in interface ErrorHandler
        Returns:
        error code
      • getErrorDescription

        public String getErrorDescription()
        Description copied from interface: ErrorHandler
        Get error description that defined in the enum
        Specified by:
        getErrorDescription in interface ErrorHandler
        Returns:
        error description.
      • getHttpStatusCode

        public int getHttpStatusCode()
        Description copied from interface: ErrorHandler
        Get Http status code that defined in the enum
        Specified by:
        getHttpStatusCode in interface ErrorHandler
        Returns:
        error code.
      • printStackTrace

        public boolean printStackTrace()
        Description copied from interface: ErrorHandler
        Return true if stack trace to print;
        Specified by:
        printStackTrace in interface ErrorHandler
        Returns: