Class SimpleValidationResults


  • public class SimpleValidationResults
    extends Object
    Methods to assist in the creation of SimpleValidationResult Errors
    • Method Detail

      • notFoundResult

        public static ValidationResult notFoundResult​(String message,
                                                      Object... args)
        Parameters:
        message - Information about what wasn't found
        Returns:
        A 'Not Found' ValidationResult
      • conflictResult

        public static ValidationResult conflictResult​(String message,
                                                      Object... args)
        A conflict result usually occurs when trying to create something that already exists
        Parameters:
        message - Information about the conflict
        Returns:
        A 'Conflict' ValidationResult
      • notImplementedResult

        public static ValidationResult notImplementedResult​(String message,
                                                            Object... args)
        To be used where some functionality hasn't been implemented.
        Parameters:
        message - Information about what hasn't been implemented
        Returns:
        A 'Not implemented' ValidationResult
      • forbiddenResult

        public static ValidationResult forbiddenResult​(String message,
                                                       Object... args)
        Parameters:
        message - Information about the forbidden result
        Returns:
        An unauthorised 'forbidden' ValidationResult.
      • invalidResult

        public static ValidationResult invalidResult​(String message,
                                                     Object... args)
        Parameters:
        message - Information about the bad request result
        Returns:
        An authorised invalid (Bad request) ValidationResult.
      • paymentRequiredResult

        public static ValidationResult paymentRequiredResult​(String message,
                                                             Object... args)
        Parameters:
        message - Information about the forbidden result
        Returns:
        An authorised 'payment required' ValidationResult.
      • notAuthenticatedResult

        public static ValidationResult notAuthenticatedResult​(String message,
                                                              Object... args)
        Parameters:
        message - Information about the unauthorised result
        Returns:
        An unauthorised 'Unauthorised' ValidationResult.