Index: sources/app/src/main/java/parkup/services/AdministratorService.java
===================================================================
--- sources/app/src/main/java/parkup/services/AdministratorService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/services/AdministratorService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
@@ -0,0 +1,145 @@
+package parkup.services;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.UUID;
+import javax.transaction.Transactional;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.stereotype.Service;
+import parkup.configs.email.EmailValidator;
+import parkup.configs.token.ConfirmationToken;
+import parkup.configs.token.ConfirmationTokenService;
+import parkup.entities.Administrator;
+import parkup.repositories.AdministratorRepository;
+
+@Service
+public class AdministratorService implements UserDetailsService {
+    private final AdministratorRepository administratorRepository;
+    private final BCryptPasswordEncoder bCryptPasswordEncoder;
+    private final ConfirmationTokenService confirmationTokenService;
+    private EmailValidator emailValidator;
+
+    @Autowired
+    public AdministratorService(AdministratorRepository administratorRepository, BCryptPasswordEncoder bCryptPasswordEncoder, ConfirmationTokenService confirmationTokenService) {
+        this.administratorRepository = administratorRepository;
+        this.bCryptPasswordEncoder = bCryptPasswordEncoder;
+        this.confirmationTokenService = confirmationTokenService;
+    }
+
+    public List<Administrator> getAllAdministrators() {
+        return this.administratorRepository.findAll();
+    }
+
+    public Administrator findById(int administratorId) {
+        Optional<Administrator> administrator = Optional.ofNullable(this.administratorRepository.findByAdministratorId(administratorId));
+        return administrator.orElse(null);
+    }
+
+    public void addAdministrator(Administrator administrator) {
+        Optional<Administrator> administratorOpt = this.administratorRepository.findAdministratorByEmail(administrator.getEmail());
+        if (administratorOpt.isPresent()) {
+            throw new IllegalStateException("Email already taken, try adding an administrator with a different valid email address");
+        } else {
+            System.out.println(administrator);
+            this.administratorRepository.save(administrator);
+        }
+    }
+
+    @Transactional
+    public void updateAdministrator(int administratorId, String firstName, String lastName, String mobile, String email) {
+        Optional<Administrator> administratorOpt = Optional.ofNullable(this.administratorRepository.findByAdministratorId(administratorId));
+        if (administratorOpt.isPresent()) {
+            Administrator administratorNov = this.administratorRepository.findByAdministratorId(administratorId);
+            if (email != null && email.length() > 1 && email.contains("@") && !Objects.equals(administratorNov.getEmail(), email)) {
+                Optional<Administrator> userOpt1 = this.administratorRepository.findAdministratorByEmail(email);
+                if (userOpt1.isPresent()) {
+                    throw new IllegalStateException("email taken");
+                }
+
+                administratorNov.setEmail(email);
+            }
+
+            if (firstName != null && firstName.length() > 1 && !Objects.equals(administratorNov.getFirstName(), firstName)) {
+                administratorNov.setFirstName(firstName);
+            }
+
+            if (lastName != null && lastName.length() > 1 && !Objects.equals(administratorNov.getLastName(), lastName)) {
+                administratorNov.setLastName(lastName);
+            }
+
+            if (mobile != null && mobile.length() > 0 && !Objects.equals(administratorNov.getMobile(), mobile)) {
+                administratorNov.setMobile(mobile);
+            }
+        }
+    }
+
+    public void deleteAdministrator(int administratorId) {
+        Optional<Administrator> administratorOpt = Optional.ofNullable(this.administratorRepository.findByAdministratorId(administratorId));
+        if (administratorOpt.isPresent()) {
+            this.administratorRepository.deleteByAdministratorId(administratorId);
+        } else {
+            throw new IllegalStateException("Administrator doesn't exist, therefore can't be deleted");
+        }
+    }
+
+    @Override
+    public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
+        return administratorRepository.findAdministratorByEmail(email)
+                .orElseThrow(() ->
+                        new UsernameNotFoundException("Email not found"));
+
+    }
+
+   //public String register(RegistrationRequest request) {
+   //    boolean isValidEmail = emailValidator.test(request.getEmail());
+   //    if (!isValidEmail){
+   //        throw new IllegalStateException("Email not valid");
+   //    }
+   //    return "it works";
+   //}
+
+    public String signUpAdministrator(Administrator administrator){
+        boolean administratorExists = administratorRepository
+                .findAdministratorByEmail(administrator.getEmail())
+                .isPresent();
+        if(administratorExists){
+            // TODO check if attributes are the same and
+            // TODO if email not confirmed send confirmation email
+
+            throw new IllegalStateException("Email already taken");
+        }
+
+        String encodedPassword = bCryptPasswordEncoder
+                .encode(administrator.getPassword());
+
+        administrator.setPassword(encodedPassword);
+
+        administratorRepository.save(administrator);
+
+        // TODO: Send confirmation token
+
+        String token = UUID.randomUUID().toString();
+        ConfirmationToken confirmationToken = new ConfirmationToken(
+                token,
+                LocalDateTime.now(),
+                LocalDateTime.now().plusMinutes(15),
+                administrator
+        );
+
+        confirmationTokenService.saveConfirmationToken(confirmationToken);
+
+        // TODO: SEND EMAIL
+
+        return token;
+    }
+
+    public int enableAdministrator(String email) {
+        return administratorRepository.enableAdministrator(email);
+    }
+}
Index: sources/app/src/main/java/parkup/services/GuestService.java
===================================================================
--- sources/app/src/main/java/parkup/services/GuestService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/services/GuestService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
@@ -0,0 +1,46 @@
+package parkup.services;
+
+import java.util.List;
+import java.util.Optional;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import parkup.entities.Guest;
+import parkup.repositories.GuestRepository;
+
+@Service
+public class GuestService {
+    private final GuestRepository guestRepository;
+
+    @Autowired
+    public GuestService(GuestRepository guestRepository) {
+        this.guestRepository = guestRepository;
+    }
+
+    public List<Guest> getGuests() {
+        return this.guestRepository.findAll();
+    }
+
+    public Guest findById(int guestId) {
+        Optional<Guest> guest = Optional.ofNullable(this.guestRepository.findByGuestId(guestId));
+        return guest.orElse(null);
+    }
+
+    public void addGuest(Guest guest) {
+        Optional<Guest> guestOpt = this.guestRepository.findGuestByEmail(guest.getEmail());
+        if (guestOpt.isPresent()) {
+            throw new IllegalStateException("Email already taken, try adding a guest with a different valid email address");
+        } else {
+            System.out.println(guest);
+            this.guestRepository.save(guest);
+        }
+    }
+
+    public void deleteGuest(int guestId) {
+        Optional<Guest> guest = Optional.ofNullable(this.guestRepository.findByGuestId(guestId));
+        if (guest.isPresent()) {
+            this.guestRepository.deleteByGuestId(guestId);
+        } else {
+            throw new IllegalStateException("Guest doesn't exist, therefore can't be deleted");
+        }
+    }
+}
Index: sources/app/src/main/java/parkup/services/ParkingSessionService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingSessionService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/services/ParkingSessionService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
@@ -0,0 +1,60 @@
+package parkup.services;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import parkup.entities.ParkingSession;
+import parkup.repositories.ParkingSessionRepository;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+@Service
+public class ParkingSessionService {
+    private final ParkingSessionRepository parkingSessionRepository;
+
+    @Autowired
+    public ParkingSessionService(ParkingSessionRepository parkingSessionRepository) {
+        this.parkingSessionRepository = parkingSessionRepository;
+    }
+
+    public List<ParkingSession> getAllParkingSessions() {
+        return parkingSessionRepository.findAll();
+    }
+
+    public ParkingSession findById(int parkingSessionId) {
+        Optional<ParkingSession> parkingSessionOpt = Optional.ofNullable(parkingSessionRepository.findByPssId(parkingSessionId));
+        return parkingSessionOpt.orElse(null);
+    }
+
+    public void updateParkingSession(int parkingSessionId, String timeStart, String timeEnd) {
+        Optional<ParkingSession> parkingSessionOpt = Optional.ofNullable(parkingSessionRepository.findByPssId(parkingSessionId));
+        if (parkingSessionOpt.isPresent()) {
+            ParkingSession parkingSessionNov = parkingSessionRepository.findByPssId(parkingSessionId);
+            if(!parkingSessionNov.getTimeStart().equals(timeStart) && !parkingSessionNov.getTimeStart().equals(timeEnd))
+                parkingSessionNov.setTimeStart(timeStart);
+
+            if(!parkingSessionNov.getTimeEnd().equals(timeEnd) && !parkingSessionNov.getTimeEnd().equals(timeStart))
+                parkingSessionNov.setTimeEnd(timeEnd);
+        }
+    }
+
+    public void deleteParkingSession(int parkingSessionId) {
+        Optional<ParkingSession> parkingSessionOpt = Optional.ofNullable(parkingSessionRepository.findByPssId(parkingSessionId));
+        if (parkingSessionOpt.isPresent()) {
+            parkingSessionRepository.deleteByPssId(parkingSessionId);
+        } else {
+            throw new IllegalStateException("ParkingSpace doesn't exist, therefore can't be deleted");
+        }
+    }
+
+    public void addParkingSession(ParkingSession parkingSession) {
+        Optional <ParkingSession> parkingSessionOpt = Optional.ofNullable(parkingSessionRepository.findByPssId(parkingSession.getPssId()));
+        if (parkingSessionOpt.isPresent()) {
+            throw new IllegalStateException("ID already taken, ParkingSession cannot be added");
+        } else {
+            System.out.println(parkingSession);
+            parkingSessionRepository.save(parkingSession);
+        }
+    }
+}
Index: sources/app/src/main/java/parkup/services/ParkingSpaceService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingSpaceService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/services/ParkingSpaceService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
@@ -0,0 +1,71 @@
+package parkup.services;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import parkup.entities.ParkingSpace;
+import parkup.repositories.ParkingSpaceRepository;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+@Service
+public class ParkingSpaceService {
+    private final ParkingSpaceRepository parkingSpaceRepository;
+
+    @Autowired
+    public ParkingSpaceService(ParkingSpaceRepository parkingSpaceRepository) {
+        this.parkingSpaceRepository = parkingSpaceRepository;
+    }
+
+    public List<ParkingSpace> getAllParkingSpaces() {
+        return parkingSpaceRepository.findAll();
+    }
+
+    public ParkingSpace findById(int parkingSpaceId) {
+        Optional<ParkingSpace> parkingSpaceOpt = Optional.ofNullable(parkingSpaceRepository.findByPsId(parkingSpaceId));
+        return parkingSpaceOpt.orElse(null);
+    }
+
+    public void addParkingSpace(ParkingSpace parkingSpace) {
+        Optional <ParkingSpace> parkingSpaceOpt = Optional.ofNullable(parkingSpaceRepository.findByPsName(parkingSpace.getPsName()));
+        if (parkingSpaceOpt.isPresent()) {
+            throw new IllegalStateException("Name already taken, try adding a ParkingZone with a different name");
+        } else {
+            System.out.println(parkingSpace);
+            parkingSpaceRepository.save(parkingSpace);
+        }
+    }
+
+    public void updateParkingSpace(int parkingSpaceId, String psName, boolean taken, boolean handicaped) {
+        Optional<ParkingSpace> ParkingSpaceOpt = Optional.ofNullable(parkingSpaceRepository.findByPsId(parkingSpaceId));
+        if (ParkingSpaceOpt.isPresent()) {
+            ParkingSpace ParkingSpaceNov = parkingSpaceRepository.findByPsId(parkingSpaceId);
+            if (psName != null && psName.length() > 1 && !Objects.equals(ParkingSpaceNov.getPsName(), psName)) {
+                Optional<ParkingSpace> parkingSpaceOpt1 = Optional.ofNullable(parkingSpaceRepository.findByPsName(psName));
+                if (parkingSpaceOpt1.isPresent()) {
+                    throw new IllegalStateException("There is already a ParkingSpace with the same name");
+                }
+
+                ParkingSpaceNov.setPsName(psName);
+            }
+
+            if (!Objects.equals(ParkingSpaceNov.isTaken(), taken)) {
+                ParkingSpaceNov.setTaken(taken);
+            }
+
+            if (!Objects.equals(ParkingSpaceNov.isHandicaped(), handicaped)) {
+                ParkingSpaceNov.setHandicaped(handicaped);
+            }
+        }
+    }
+
+    public void deleteParkingSpace(int parkingSpaceId) {
+        Optional<ParkingSpace> parkingSpaceOpt = Optional.ofNullable(parkingSpaceRepository.findByPsId(parkingSpaceId));
+        if (parkingSpaceOpt.isPresent()) {
+            parkingSpaceRepository.deleteByPsId(parkingSpaceId);
+        } else {
+            throw new IllegalStateException("ParkingSpace doesn't exist, therefore can't be deleted");
+        }
+    }
+}
Index: sources/app/src/main/java/parkup/services/ParkingZoneService.java
===================================================================
--- sources/app/src/main/java/parkup/services/ParkingZoneService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/services/ParkingZoneService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
@@ -0,0 +1,82 @@
+package parkup.services;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import parkup.entities.Administrator;
+import parkup.entities.ParkingZone;
+import parkup.repositories.ParkingZoneRepository;
+
+import javax.transaction.Transactional;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+@Service
+public class ParkingZoneService {
+    private final ParkingZoneRepository parkingZoneRepository;
+
+    @Autowired
+    public ParkingZoneService(ParkingZoneRepository parkingZoneRepository) {
+        this.parkingZoneRepository = parkingZoneRepository;
+    }
+
+    public List<ParkingZone> getAllParkingZones() {
+        return parkingZoneRepository.findAll();
+    }
+
+    public ParkingZone findById(int parkingZoneId) {
+        Optional<ParkingZone> parkingZone = Optional.ofNullable(this.parkingZoneRepository.findByPzId(parkingZoneId));
+        return parkingZone.orElse(null);
+    }
+
+    public void addParkingZone(ParkingZone parkingZone) {   //zavisno vo koj grad ili opstina i napravi proverki pred dodavanje, implementiraj u naredna faza
+        Optional<ParkingZone> parkingZoneOpt = Optional.ofNullable(parkingZoneRepository.findByPzName(parkingZone.getPzName()));
+        if (parkingZoneOpt.isPresent()) {
+            throw new IllegalStateException("Name already taken, try adding a ParkingZone with a different name");
+        } else {
+            System.out.println(parkingZone);
+            parkingZoneRepository.save(parkingZone);
+        }
+    }
+
+    @Transactional
+    public void updateParkingZone(int parkingZoneId, String pzName, int price, int capacity, String workHours, String location) {
+        Optional<ParkingZone> parkingZoneOpt = Optional.ofNullable(parkingZoneRepository.findByPzId(parkingZoneId));
+        if (parkingZoneOpt.isPresent()) {
+            ParkingZone parkingZoneNov = parkingZoneRepository.findByPzId(parkingZoneId);
+            if (pzName != null && pzName.length() > 1 && !Objects.equals(parkingZoneNov.getPzName(), pzName)) {
+                Optional<ParkingZone> parkingZoneOpt1 = Optional.ofNullable(parkingZoneRepository.findByPzName(pzName));
+                if (parkingZoneOpt1.isPresent()) {
+                    throw new IllegalStateException("There is already a ParkingZone with the same name");
+                }
+
+                parkingZoneNov.setPzName(pzName);
+            }
+
+            if (price != 0 && !Objects.equals(parkingZoneNov.getPrice(), price)) {
+                parkingZoneNov.setPrice(price);
+            }
+
+            if (capacity != 0 && !Objects.equals(parkingZoneNov.getCapacity(), capacity)) {
+                parkingZoneNov.setCapacity(capacity);
+            }
+
+            if (workHours != null && workHours.length() > 0 && !Objects.equals(parkingZoneNov.getWorkHours(), workHours)) {
+                parkingZoneNov.setWorkHours(workHours);
+            }
+
+            if (location != null && location.length() > 0 && !Objects.equals(parkingZoneNov.getLocation(), location)) {
+                parkingZoneNov.setLocation(location);
+            }
+        }
+    }
+
+    public void deleteParkingZone(int parkingZoneId) {
+        Optional<ParkingZone> parkingZoneOpt = Optional.ofNullable(parkingZoneRepository.findByPzId(parkingZoneId));
+        if (parkingZoneOpt.isPresent()) {
+            parkingZoneRepository.deleteByPzId(parkingZoneId);
+        } else {
+            throw new IllegalStateException("ParkingZone doesn't exist, therefore can't be deleted");
+        }
+    }
+}
Index: sources/app/src/main/java/parkup/services/RegistriranParkiracService.java
===================================================================
--- sources/app/src/main/java/parkup/services/RegistriranParkiracService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/services/RegistriranParkiracService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
@@ -0,0 +1,76 @@
+package parkup.services;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import javax.transaction.Transactional;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import parkup.entities.RegistriranParkirac;
+import parkup.repositories.RegistriranParkiracRepository;
+
+@Service
+public class RegistriranParkiracService {
+    private final RegistriranParkiracRepository registriranParkiracRepository;
+
+    @Autowired
+    public RegistriranParkiracService(RegistriranParkiracRepository registriranParkiracRepository) {
+        this.registriranParkiracRepository = registriranParkiracRepository;
+    }
+
+    public List<RegistriranParkirac> getRegPark() {
+        return this.registriranParkiracRepository.findAll();
+    }
+
+    public void addRegPark(RegistriranParkirac regPark) {
+        Optional<RegistriranParkirac> regParkOpt = this.registriranParkiracRepository.findRegistriranParkiracByEmail(regPark.getEmail());
+        if (regParkOpt.isPresent()) {
+            throw new IllegalStateException("Email already taken, try adding a registriranParkirac with a different valid email address");
+        } else {
+            System.out.println(regPark);
+            this.registriranParkiracRepository.save(regPark);
+        }
+    }
+
+    @Transactional
+    public void updateRegPark(int regParkId, String name, String surname, String mobile, String email) {
+        Optional<RegistriranParkirac> regParkOpt = Optional.ofNullable(this.registriranParkiracRepository.findByRegParkId(regParkId));
+        if (regParkOpt.isPresent()) {
+            RegistriranParkirac regParkNov = this.registriranParkiracRepository.findByRegParkId(regParkId);
+            if (email != null && email.length() > 1 && email.contains("@") && !Objects.equals(regParkNov.getEmail(), email)) {
+                Optional<RegistriranParkirac> userOpt1 = this.registriranParkiracRepository.findRegistriranParkiracByEmail(email);
+                if (userOpt1.isPresent()) {
+                    throw new IllegalStateException("email taken");
+                }
+
+                regParkNov.setEmail(email);
+            }
+
+            if (name != null && name.length() > 1 && !Objects.equals(regParkNov.getName(), name)) {
+                regParkNov.setName(name);
+            }
+
+            if (surname != null && surname.length() > 1 && !Objects.equals(regParkNov.getSurname(), surname)) {
+                regParkNov.setSurname(surname);
+            }
+
+            if (mobile != null && mobile.length() > 0 && !Objects.equals(regParkNov.getMobile(), mobile)) {
+                regParkNov.setMobile(mobile);
+            }
+        }
+    }
+
+    public void deleteRegPark(int regParkId) {
+        Optional<RegistriranParkirac> regPark = Optional.ofNullable(this.registriranParkiracRepository.findByRegParkId(regParkId));
+        if (regPark.isPresent()) {
+            this.registriranParkiracRepository.deleteByRegParkId(regParkId);
+        } else {
+            throw new IllegalStateException("RegistriranParkirac doesn't exist, therefore can't be deleted");
+        }
+    }
+
+    public RegistriranParkirac findById(int regParkId) {
+        Optional<RegistriranParkirac> regPark = Optional.ofNullable(this.registriranParkiracRepository.findByRegParkId(regParkId));
+        return regPark.orElse(null);
+    }
+}
Index: sources/app/src/main/java/parkup/services/VrabotenService.java
===================================================================
--- sources/app/src/main/java/parkup/services/VrabotenService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/services/VrabotenService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
@@ -0,0 +1,77 @@
+package parkup.services;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.UUID;
+import javax.transaction.Transactional;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import parkup.entities.Vraboten;
+import parkup.repositories.VrabotenRepository;
+
+@Service
+public class VrabotenService {
+    private final VrabotenRepository vrabotenRepository;
+
+    @Autowired
+    public VrabotenService(VrabotenRepository vrabotenRepository) {
+        this.vrabotenRepository = vrabotenRepository;
+    }
+
+    public List<Vraboten> getVraboteni() {
+        return this.vrabotenRepository.findAll();
+    }
+
+    public Vraboten findById(int vrabotenId) {
+        Optional<Vraboten> vraboten = Optional.ofNullable(this.vrabotenRepository.findByVrabotenId(vrabotenId));
+        return vraboten.orElse(null);
+    }
+
+    public void addVraboten(Vraboten vraboten) {
+        Optional<Vraboten> vrabotenOpt = this.vrabotenRepository.findVrabotenByEmail(vraboten.getEmail());
+        if (vrabotenOpt.isPresent()) {
+            throw new IllegalStateException("Email already taken, try adding a vraboten with a different valid email address");
+        } else {
+            System.out.println(vraboten);
+            this.vrabotenRepository.save(vraboten);
+        }
+    }
+
+    @Transactional
+    public void updateVraboten(int vrabotenId, String firstName, String lastName, String mobile, String email) {
+        Optional<Vraboten> vrabotenOpt = Optional.ofNullable(this.vrabotenRepository.findByVrabotenId(vrabotenId));
+        if (vrabotenOpt.isPresent()) {
+            Vraboten vrabotenNov = this.vrabotenRepository.findByVrabotenId(vrabotenId);
+            if (email != null && email.length() > 1 && email.contains("@") && !Objects.equals(vrabotenNov.getEmail(), email)) {
+                Optional<Vraboten> userOpt1 = this.vrabotenRepository.findVrabotenByEmail(email);
+                if (userOpt1.isPresent()) {
+                    throw new IllegalStateException("email taken");
+                }
+
+                vrabotenNov.setEmail(email);
+            }
+
+            if (firstName != null && firstName.length() > 1 && !Objects.equals(vrabotenNov.getFirstName(), firstName)) {
+                vrabotenNov.setFirstName(firstName);
+            }
+
+            if (lastName != null && lastName.length() > 1 && !Objects.equals(vrabotenNov.getLastName(), lastName)) {
+                vrabotenNov.setLastName(lastName);
+            }
+
+            if (mobile != null && mobile.length() > 0 && !Objects.equals(vrabotenNov.getMobile(), mobile)) {
+                vrabotenNov.setMobile(mobile);
+            }
+        }
+    }
+
+    public void deleteVraboten(int vrabotenId) {
+        Optional<Vraboten> vrabotenOpt = Optional.ofNullable(this.vrabotenRepository.findByVrabotenId(vrabotenId));
+        if (vrabotenOpt.isPresent()) {
+            this.vrabotenRepository.deleteByVrabotenId(vrabotenId);
+        } else {
+            throw new IllegalStateException("Vraboten doesn't exist, therefore can't be deleted");
+        }
+    }
+}
