Enum SystemExceptionFactory.SystemErrors

    • Method Detail

      • values

        public static SystemExceptionFactory.SystemErrors[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SystemExceptionFactory.SystemErrors c : SystemExceptionFactory.SystemErrors.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SystemExceptionFactory.SystemErrors valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • createException

        public com.lexmark.saperion.exceptions.system.SystemException createException​(com.lexmark.saperion.exceptions.ErrorType fault,
                                                                                      java.lang.Throwable cause)
        Description copied from interface: ExceptionMapping
        Creates a new exception for the given server fault.
        Specified by:
        createException in interface ExceptionMapping<com.lexmark.saperion.exceptions.system.SystemException>
        Parameters:
        fault - the server error
        cause - the exception cause
        Returns:
        the new exception
      • createException

        public com.lexmark.saperion.exceptions.system.SystemException createException​(java.lang.String message)
        Description copied from interface: ExceptionMapping
        Creates a new exception for the given server fault.
        Specified by:
        createException in interface ExceptionMapping<com.lexmark.saperion.exceptions.system.SystemException>
        Parameters:
        message - the error message
        Returns:
        the new exception
      • createException

        public com.lexmark.saperion.exceptions.system.SystemException createException​(java.lang.String message,
                                                                                      java.lang.Throwable cause)
        Description copied from interface: ExceptionMapping
        Creates a new exception for the given server fault.
        Specified by:
        createException in interface ExceptionMapping<com.lexmark.saperion.exceptions.system.SystemException>
        Parameters:
        message - the error message
        cause - the exception cause
        Returns:
        the new exception
      • createException

        public com.lexmark.saperion.exceptions.system.SystemException createException​(java.lang.Throwable cause)
        Description copied from interface: ExceptionMapping
        Creates a new exception for the given server fault.
        Specified by:
        createException in interface ExceptionMapping<com.lexmark.saperion.exceptions.system.SystemException>
        Parameters:
        cause - the exception cause
        Returns:
        the new exception
      • getErrorCode

        public com.lexmark.saperion.exceptions.ErrorCodeType getErrorCode()
        Description copied from interface: ExceptionMapping
        Returns the error code this exception mapping applies to.
        Specified by:
        getErrorCode in interface ExceptionMapping<com.lexmark.saperion.exceptions.system.SystemException>
        Returns:
        the exception mapping's error code
      • validate

        public boolean validate()
        Description copied from interface: ExceptionMapping
        Validates the integrity of the exception mapping. An exception mapping is valid if the mapped exception class can be instantiated and an appropriate factory constructor exists. Appropriate exception implementations must provide a factory constructors that consume an ErrorType and a Throwable.
        Specified by:
        validate in interface ExceptionMapping<com.lexmark.saperion.exceptions.system.SystemException>
        Returns:
        true if the mapping is valid and the mapped exception fits the design rules, otherwise false