package at.ac.tuwien.inso.service.validator;

import at.ac.tuwien.inso.entity.UisUser;
import at.ac.tuwien.inso.exception.ValidationException;

public class UisUserValidator {

    public void validateNewUisUser(UisUser uisUser) {

        if(uisUser == null) {
            throw new ValidationException("User not found");
        }

        if(uisUser.getName() == null || uisUser.getName().isEmpty()) {
            throw new ValidationException("Name of user cannot be empty");
        }

        if(uisUser.getIdentificationNumber() == null || uisUser.getIdentificationNumber().isEmpty()) {
            throw new ValidationException("Identification number of user cannot be empty");
        }

        if(uisUser.getEmail() == null || uisUser.getEmail().isEmpty()) {
            throw new ValidationException("Email of user cannot be empty");
        }

        //TODO please validate the email
    }

    public void validateUisUserId(Long id) {
        if(id == null || id < 1) {
            throw new ValidationException("User invalid id");
        }
    }
}

@@ -227,32 +227,33 @@
 r) %7B%0A%0A        if
+ 
 (uisUser == null
@@ -252,24 +252,24 @@
  == null) %7B%0A
-
             
@@ -330,32 +330,33 @@
    %7D%0A%0A        if
+ 
 (uisUser.getName
@@ -488,32 +488,33 @@
    %7D%0A%0A        if
+ 
 (uisUser.getIden
@@ -685,32 +685,32 @@
 y%22);%0A        %7D%0A%0A
-
         if(uisUs
@@ -703,16 +703,17 @@
       if
+ 
 (uisUser

Fix code style