- java.lang.Object
-
- services.RequestSupervisorService
-
- All Implemented Interfaces:
IRequestSupervisorService
- Direct Known Subclasses:
RequestFYPCoordinatorService
public class RequestSupervisorService extends java.lang.Object implements IRequestSupervisorService
TheRequestSupervisorServiceclass implementsIRequestSupervisorService, providing request-related functionalities for supervisors.
-
-
Constructor Summary
Constructors Constructor Description RequestSupervisorService()Constructs an instance of theRequestSupervisorServiceclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapproveProject(Request request)Approves the specified project request.booleancreateTransferStudentRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, java.lang.String replacementSupervisorID)Creates a new transfer student request with the specified sender ID, receiver ID, project ID, and replacement supervisor ID.java.util.ArrayList<Request>getIncomingRequests(java.lang.String supervisorID)Retrieves a list of incoming requests sent to the supervisor with the specified ID.java.util.ArrayList<Request>getOutgoingRequests(java.lang.String supervisorID)Retrieves a list of outgoing requests sent by the supervisor with the specified ID.java.util.ArrayList<Request>getStudentPendingRequests(java.lang.String supervisorID)Retrieves a list of pending requests made by the students of the supervisor with the specified ID.booleanrejectProject(Request request)Rejects the specified project request.
-
-
-
Constructor Detail
-
RequestSupervisorService
public RequestSupervisorService()
Constructs an instance of theRequestSupervisorServiceclass.
-
-
Method Detail
-
getStudentPendingRequests
public java.util.ArrayList<Request> getStudentPendingRequests(java.lang.String supervisorID)
Description copied from interface:IRequestSupervisorServiceRetrieves a list of pending requests made by the students of the supervisor with the specified ID.- Specified by:
getStudentPendingRequestsin interfaceIRequestSupervisorService- Parameters:
supervisorID- the ID of the supervisor- Returns:
- an
ArrayListofRequestobjects representing the pending requests made by the students of the supervisor
-
getIncomingRequests
public java.util.ArrayList<Request> getIncomingRequests(java.lang.String supervisorID)
Description copied from interface:IRequestSupervisorServiceRetrieves a list of incoming requests sent to the supervisor with the specified ID.- Specified by:
getIncomingRequestsin interfaceIRequestSupervisorService- Parameters:
supervisorID- the ID of the supervisor- Returns:
- an
ArrayListofRequestobjects representing the incoming requests sent to the supervisor
-
getOutgoingRequests
public java.util.ArrayList<Request> getOutgoingRequests(java.lang.String supervisorID)
Description copied from interface:IRequestSupervisorServiceRetrieves a list of outgoing requests sent by the supervisor with the specified ID.- Specified by:
getOutgoingRequestsin interfaceIRequestSupervisorService- Parameters:
supervisorID- the ID of the supervisor- Returns:
- an
ArrayListofRequestobjects representing the outgoing requests sent by the supervisor
-
approveProject
public boolean approveProject(Request request)
Description copied from interface:IRequestSupervisorServiceApproves the specified project request.- Specified by:
approveProjectin interfaceIRequestSupervisorService- Parameters:
request- theRequestobject to be approved- Returns:
- true if the request was approved successfully, false otherwise
-
rejectProject
public boolean rejectProject(Request request)
Description copied from interface:IRequestSupervisorServiceRejects the specified project request.- Specified by:
rejectProjectin interfaceIRequestSupervisorService- Parameters:
request- theRequestobject to be rejected- Returns:
- true if the request was rejected successfully, false otherwise
-
createTransferStudentRequest
public boolean createTransferStudentRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, java.lang.String replacementSupervisorID)Description copied from interface:IRequestSupervisorServiceCreates a new transfer student request with the specified sender ID, receiver ID, project ID, and replacement supervisor ID.- Specified by:
createTransferStudentRequestin interfaceIRequestSupervisorService- Parameters:
senderID- the ID of the sender of the requestreceiverID- the ID of the receiver of the requestprojectID- the ID of the project associated with the requestreplacementSupervisorID- the ID of the supervisor who will be the new supervisor for the transferred student- Returns:
- true if the request was created successfully, false otherwise
-
-