org.domain.rhims.manager
Interface UserManager

All Known Implementing Classes:
UserManagerAction

public interface UserManager

The UserManager is the business/application logic that handles the users of the system, such as clinicians and patients. It is responsible for registering new users, along with validating users and retrieving users. It is a component of the Application layer.

Author:
Mitch Williams

Method Summary
 java.util.List<Clinician> getAllClinicians()
          This method gets a list of all the Clinicians in the system.
 java.util.List<Patient> getAllPatients()
          This method gets a list of all the Patients in the system.
 Clinician getClinician(java.lang.String clinicianUsername)
          This method retrieves a Clinician given their username
 Patient getPatient(java.lang.String patientUsername)
          This method retrieves a Patient given their username
 boolean loginUser(java.lang.String userName, java.lang.String password)
          This method attempts to login a user by verifying that they exist in the application's persistence means.
 java.lang.String registerClinician(java.lang.String username, java.lang.String password, java.lang.String firstName, java.lang.String lastName, java.lang.String emailAddress, java.lang.String phoneNumber, java.lang.String department)
          This method adds a new Clinician to the system by registering them.
 java.lang.String registerPatient(java.lang.String username, java.lang.String password, java.lang.String firstName, java.lang.String lastName, int age, Gender gender, java.lang.String emailAddress, java.lang.String phoneNumber)
          This method adds a new patient to the system by registering them.
 java.lang.String registerUser(java.lang.String userName, java.lang.String password, boolean admin)
          This method adds a new user to the system by registering them.
 

Method Detail

registerUser

java.lang.String registerUser(java.lang.String userName,
                              java.lang.String password,
                              boolean admin)
This method adds a new user to the system by registering them.

Parameters:
userName - the username of the new user
password - the password of the new user
admin - is the user going to be an administrator
Returns:
"success" if the user is added, "failure" if not.

registerPatient

java.lang.String registerPatient(java.lang.String username,
                                 java.lang.String password,
                                 java.lang.String firstName,
                                 java.lang.String lastName,
                                 int age,
                                 Gender gender,
                                 java.lang.String emailAddress,
                                 java.lang.String phoneNumber)
This method adds a new patient to the system by registering them.

Parameters:
username -
password -
firstName -
lastName -
age -
gender -
emailAddress -
phoneNumber -
Returns:

registerClinician

java.lang.String registerClinician(java.lang.String username,
                                   java.lang.String password,
                                   java.lang.String firstName,
                                   java.lang.String lastName,
                                   java.lang.String emailAddress,
                                   java.lang.String phoneNumber,
                                   java.lang.String department)
This method adds a new Clinician to the system by registering them.

Parameters:
username -
password -
firstName -
lastName -
emailAddress -
phoneNumber -
department -
Returns:

loginUser

boolean loginUser(java.lang.String userName,
                  java.lang.String password)
This method attempts to login a user by verifying that they exist in the application's persistence means.

Parameters:
userName - the username of the user
password - the password of the user
Returns:
true if login was successful, false if not

getPatient

Patient getPatient(java.lang.String patientUsername)
This method retrieves a Patient given their username

Parameters:
patientUsername - the username of the Patient to retrieve
Returns:
the Patient

getClinician

Clinician getClinician(java.lang.String clinicianUsername)
This method retrieves a Clinician given their username

Parameters:
clinicianUsername - the username of the Clinician to retrieve
Returns:
the Clinician

getAllPatients

java.util.List<Patient> getAllPatients()
This method gets a list of all the Patients in the system. It is intended to be used for actions such as viewing all the Patients so that they can be added to a CaseFile.

Returns:
a list of all the Patients in the system

getAllClinicians

java.util.List<Clinician> getAllClinicians()
This method gets a list of all the Clinicians in the system. It is intended to be used for actions such as viewing all the Clinicians so that they can be added to a CaseFile.

Returns:
a list of all the Clinicians in the system