You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
872 B
46 lines
872 B
/**
|
|
* 课程管理接口
|
|
* 体现接口隔离原则和依赖倒置原则
|
|
* 定义课程管理的核心功能
|
|
*/
|
|
package com.employeetraining.course;
|
|
|
|
import java.util.List;
|
|
import java.util.Optional;
|
|
|
|
public interface CourseManager {
|
|
/**
|
|
* 添加新课程
|
|
*/
|
|
void addCourse(Course course);
|
|
|
|
/**
|
|
* 更新课程信息
|
|
*/
|
|
boolean updateCourse(Course course);
|
|
|
|
/**
|
|
* 删除课程
|
|
*/
|
|
boolean deleteCourse(String courseId);
|
|
|
|
/**
|
|
* 根据ID查找课程
|
|
*/
|
|
Optional<Course> findCourseById(String courseId);
|
|
|
|
/**
|
|
* 根据类别查找课程
|
|
*/
|
|
List<Course> findCoursesByCategory(String category);
|
|
|
|
/**
|
|
* 查找所有必修课程
|
|
*/
|
|
List<Course> findRequiredCourses();
|
|
|
|
/**
|
|
* 获取所有课程
|
|
*/
|
|
List<Course> getAllCourses();
|
|
} |