diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dto/EmployeeValidator.java | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dto/EmployeeValidator.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dto/EmployeeValidator.java index d7fa9aa..994be3f 100644 --- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dto/EmployeeValidator.java +++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dto/EmployeeValidator.java @@ -1,20 +1,27 @@  package at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto;  import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidEmployeeException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory;  public class EmployeeValidator { +    private static final Logger LOG = LoggerFactory.getLogger(EmployeeValidator.class); +      public static boolean validate(Employee employee) throws InvalidEmployeeException {          if (employee.name() == null || employee.name().trim().length() == 0) { +            LOG.info("Invalid Employee: Name was not set");              throw new InvalidEmployeeException("name not set");          }          if (employee.birthday() == null) { +            LOG.info("Invalid Employee: Birthday was not set");              throw new InvalidEmployeeException("birthday not set");          }          if (employee.educationLevel() == null) { +            LOG.info("Invalid Employee: EducationLevel was not set");              throw new InvalidEmployeeException("educationLevel not set");          }  | 
