Package org.cswteams.ms3.control.user
Class UserController
java.lang.Object
org.cswteams.ms3.control.user.UserController
- All Implemented Interfaces:
IUserController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCondition(Doctor doctor, Condition condition) TODO: Refactor this usage when design pattern will be implemented TODO: Add checks on persistence state and throw exception in that case TODO: Check if condition is still valid on user login to implements temporary condition deleting logicvoidaddPreference(Doctor doctor, Preference preference) voidaddSpecialization(Doctor doctor, Specialization specialization) voidaddSystemActor(Long userID, Set<String> systemActors) voidvoiddeleteUserSystemActor(Long userID, String systemActor) getSingleUser(long userId) getSingleUserProfileInfos(Long userId) Function that has the responsibility to retrive information about single user profile to be shown in the user profile view.
-
Constructor Details
-
UserController
public UserController()
-
-
Method Details
-
getAllUsers
- Specified by:
getAllUsersin interfaceIUserController
-
createUser
- Specified by:
createUserin interfaceIUserController
-
getSingleUser
- Specified by:
getSingleUserin interfaceIUserController
-
addCondition
TODO: Refactor this usage when design pattern will be implemented TODO: Add checks on persistence state and throw exception in that case TODO: Check if condition is still valid on user login to implements temporary condition deleting logic- Parameters:
doctor-condition-- Throws:
Exception
-
addPreference
- Throws:
Exception
-
addSpecialization
- Throws:
Exception
-
getSingleUserProfileInfos
Description copied from interface:IUserControllerFunction that has the responsibility to retrive information about single user profile to be shown in the user profile view. In particular this method converts doctor entity of the backend in the- Specified by:
getSingleUserProfileInfosin interfaceIUserController- Parameters:
userId- The ID of the user/doctor we are searching- Returns:
- A well formatted DTO or a dummy DTO with id = -1 if id doesn't corresponds to any DB entry or a null instance if there has been any other problem in the backend
-
deleteUserSystemActor
- Specified by:
deleteUserSystemActorin interfaceIUserController
-
addSystemActor
- Specified by:
addSystemActorin interfaceIUserController
-