Class InstructorStaffService
java.lang.Object
edu.ucsb.cs156.frontiers.services.InstructorStaffService
Keeps the instructor of each course listed as one of that course's staff members.
-
Constructor Summary
ConstructorsConstructorDescriptionInstructorStaffService(CourseRepository courseRepository, CourseStaffRepository courseStaffRepository, UserRepository userRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks every course and fixes any where the instructor is not a staff member.voidensureInstructorIsStaff(Course course) Adds the course's instructor as a staff member, unless they already are one.
-
Constructor Details
-
InstructorStaffService
public InstructorStaffService(CourseRepository courseRepository, CourseStaffRepository courseStaffRepository, UserRepository userRepository)
-
-
Method Details
-
ensureInstructorIsStaff
Adds the course's instructor as a staff member, unless they already are one. -
ensureAllInstructorsAreStaff
public void ensureAllInstructorsAreStaff()Checks every course and fixes any where the instructor is not a staff member.
-