Class InputValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
se.idsec.signservice.integration.core.error.SignServiceIntegrationException
se.idsec.signservice.integration.core.error.SignServiceIntegrationCategoryException
se.idsec.signservice.integration.core.error.BadRequestException
se.idsec.signservice.integration.core.error.InputValidationException
- All Implemented Interfaces:
Serializable
Exception class for input validation errors.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ErrorCode.Code
The error code for this type of error.Fields inherited from class se.idsec.signservice.integration.core.error.BadRequestException
BAD_REQUEST_ERROR_CATEGORY
-
Constructor Summary
ConstructorsConstructorDescriptionInputValidationException
(String objectName) Constructor taking the name of the object being validated.InputValidationException
(String objectName, String msg) Constructor taking the name of the object being validated and an error message.InputValidationException
(String objectName, String msg, Throwable cause) Constructor taking the name of the object being validated and an error message.Constructor taking the name of the object being validated, an error message and underlying errors details (field names and error messages).InputValidationException
(String objectName, String msg, Map<String, String> details, Throwable cause) Constructor taking the name of the object being validated, an error message and underlying errors details (field names and error messages).InputValidationException
(String objectName, Throwable cause) Constructor taking the name of the object being validated.InputValidationException
(String objectName, Map<String, String> details) Constructor taking the name of the object being validated and underlying errors details (field names and error messages).Constructor taking the name of the object being validated and underlying errors details (field names and error messages). -
Method Summary
Modifier and TypeMethodDescriptionGets the details for the validation error.Gets the name of the object that was validated.Methods inherited from class se.idsec.signservice.integration.core.error.BadRequestException
getCategory, getHttpStatus
Methods inherited from class se.idsec.signservice.integration.core.error.SignServiceIntegrationException
getErrorCode
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ERROR_CODE
The error code for this type of error.
-
-
Constructor Details
-
InputValidationException
Constructor taking the name of the object being validated.- Parameters:
objectName
- the field name of the object being validated
-
InputValidationException
Constructor taking the name of the object being validated and an error message.- Parameters:
objectName
- the field name of the object being validatedmsg
- the error message
-
InputValidationException
Constructor taking the name of the object being validated and underlying errors details (field names and error messages).- Parameters:
objectName
- the field name of the object being validateddetails
- underlying error information (field names and error messages)
-
InputValidationException
Constructor taking the name of the object being validated, an error message and underlying errors details (field names and error messages).- Parameters:
objectName
- the field name of the object being validatedmsg
- the error messagedetails
- underlying error information (field names and error messages)
-
InputValidationException
Constructor taking the name of the object being validated.- Parameters:
objectName
- the field name of the object being validatedcause
- the cause of the error
-
InputValidationException
Constructor taking the name of the object being validated and an error message.- Parameters:
objectName
- the field name of the object being validatedmsg
- the error messagecause
- the cause of the error
-
InputValidationException
Constructor taking the name of the object being validated and underlying errors details (field names and error messages).- Parameters:
objectName
- the field name of the object being validateddetails
- underlying error information (field names and error messages)cause
- the cause of the error
-
InputValidationException
public InputValidationException(String objectName, String msg, Map<String, String> details, Throwable cause) Constructor taking the name of the object being validated, an error message and underlying errors details (field names and error messages).- Parameters:
objectName
- the field name of the object being validatedmsg
- the error messagedetails
- underlying error information (field names and error messages)cause
- the cause of the error
-
-
Method Details
-
getObjectName
Gets the name of the object that was validated.- Returns:
- the name of the validated object
-
getDetails
Gets the details for the validation error. The map consists of field names for the underlying object that were validated and associated error messages.- Returns:
- a map of field names and error messages, or null if no details are set
-