package com.logicify.d2g.services;

import com.logicify.d2g.domain.User;
import com.logicify.d2g.dtos.incomingdtos.UserCreateIncomingDto;
import com.logicify.d2g.dtos.incomingdtos.UserUpdateIncomingDto;
import com.logicify.d2g.dtos.incomingdtos.UserUpdateStatusIncomingDto;
import com.logicify.d2g.dtos.outgoingdtos.UserOutgoingDto;
import com.logicify.d2g.dtos.outgoingdtos.UsersListOutgoingDto;
import com.logicify.d2g.utils.PasswordStorage;

import java.util.UUID;

/**
 * @author knorr
 */
public interface UserService {

    String createPasswordHash(String password) throws PasswordStorage.CannotPerformOperationException;

    void createUser(UserCreateIncomingDto userCreateIncomingDto) throws PasswordStorage.CannotPerformOperationException;

    UsersListOutgoingDto findAll();

    UserOutgoingDto findOne(UUID id);

    void delete(UUID id);

    void updateUser(UUID id, UserUpdateIncomingDto userUpdateIncomingDto) throws PasswordStorage.CannotPerformOperationException;

    void updateStatus(UUID id, UserUpdateStatusIncomingDto userUpdateStatusIncomingDto);

    /**
     * Returns user by it's UUID
     *
     * @param id user uuif
     * @return requested {@link User}
     */
     //TODO: Implement finding user by its uuid


}

@@ -66,16 +66,84 @@
 n.User;%0A
+import com.logicify.d2g.dtos.domain.exceptions.ControllerException;%0A
 import c
@@ -461,55 +461,8 @@
 Dto;
-%0Aimport com.logicify.d2g.utils.PasswordStorage;
 %0A%0Aim
@@ -598,46 +598,19 @@
 ows 
-PasswordStorage.CannotPerformOperation
+ Controller
 Exce
@@ -693,46 +693,18 @@
 ows 
-PasswordStorage.CannotPerformOperation
+Controller
 Exce
@@ -788,35 +788,89 @@
  id)
-;%0A%0A    void delete(UUID id)
+ throws ControllerException;%0A%0A    void delete(UUID id) throws ControllerException
 ;%0A%0A 
@@ -953,46 +953,18 @@
 ows 
-PasswordStorage.CannotPerformOperation
+Controller
 Exce

Create a custom exception type: Change service method signature for own exception class