Class ProfileValidator.RejectionCause

  • Enclosing interface:
    ProfileValidator

    public static class ProfileValidator.RejectionCause
    extends java.lang.Object
    Rejection Cause
    • Constructor Detail

      • RejectionCause

        public RejectionCause​(java.lang.String error)
        Constructor
        Parameters:
        error -
    • Method Detail

      • rejectIdNotAllowedInCreate

        public static ProfileValidator.RejectionCause rejectIdNotAllowedInCreate​(java.lang.String profileIdentifier)
        Reject if id exisit and the action is creation. If id exists, it should be an update instead of create
        Parameters:
        profileIdentifier -
        Returns:
        RejectionCause
      • rejectDuplicatedInDatabase

        public static ProfileValidator.RejectionCause rejectDuplicatedInDatabase​(java.lang.String identifier)
        Verify for each profile if already exists one in database that have the same identifier and/or name. The database my manage this kind of constraint (by creating an unique index on the field or column)
        Parameters:
        identifier -
        Returns:
        RejectionCause
      • rejectMandatoryMissing

        public static ProfileValidator.RejectionCause rejectMandatoryMissing​(java.lang.String fieldName)
        Reject if one of multiple mandatory parameter are null
        Parameters:
        fieldName -
        Returns:
        RejectionCause
      • rejectSeveralMandatoryMissing

        public static ProfileValidator.RejectionCause rejectSeveralMandatoryMissing​(java.util.List<java.lang.String> fieldsName)
        Reject if multiple mandatory parameters are null
        Parameters:
        fieldsName -
        Returns:
        RejectionCause
      • getReason

        public java.lang.String getReason()
        Get reason
        Returns:
        reason