package at.ac.tuwien.inso.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.access.prepost.PreAuthorize;

import at.ac.tuwien.inso.entity.*;

import java.util.*;

public interface SubjectService {

    @PreAuthorize("isAuthenticated()")
    Page<Subject> findAll(Pageable pageable);

    @PreAuthorize("isAuthenticated()")
    Subject findOne(long id);

    @PreAuthorize("isAuthenticated()")
    List<Subject> searchForSubjects(String word);

    @PreAuthorize("hasRole('ADMIN')")
    Subject create(Subject subject);

    @PreAuthorize("hasRole('ADMIN')")
    Subject addLecturerToSubject(Long subjectId, Long lecturerUisUserId);

    @PreAuthorize("hasRole('ADMIN')")
    List<Lecturer> getAvailableLecturersForSubject(Long subjectId);

    @PreAuthorize("hasRole('ADMIN')")
    void removeLecturerFromSubject(Long subjectId, Long lecturerId);
}

@@ -900,12 +900,16 @@
     
-void
+Lecturer
  rem
@@ -960,16 +960,23 @@
 lecturer
+UisUser
 Id);%0D%0A%7D%0D

Add return value to removeLecturerFromSubject