- java.lang.Object
-
- services.RequestSupervisorService
-
- All Implemented Interfaces:
IRequestSupervisorService
- Direct Known Subclasses:
RequestFYPCoordinatorService
public class RequestSupervisorService extends java.lang.Object implements IRequestSupervisorService
TheRequestSupervisorService
class implementsIRequestSupervisorService
, providing request-related functionalities for supervisors.
-
-
Constructor Summary
Constructors Constructor Description RequestSupervisorService()
Constructs an instance of theRequestSupervisorService
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
approveProject(Request request)
Approves the specified project request.boolean
createTransferStudentRequest(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.boolean
rejectProject(Request request)
Rejects the specified project request.
-
-
-
Constructor Detail
-
RequestSupervisorService
public RequestSupervisorService()
Constructs an instance of theRequestSupervisorService
class.
-
-
Method Detail
-
getStudentPendingRequests
public java.util.ArrayList<Request> getStudentPendingRequests(java.lang.String supervisorID)
Description copied from interface:IRequestSupervisorService
Retrieves a list of pending requests made by the students of the supervisor with the specified ID.- Specified by:
getStudentPendingRequests
in interfaceIRequestSupervisorService
- Parameters:
supervisorID
- the ID of the supervisor- Returns:
- an
ArrayList
ofRequest
objects 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:IRequestSupervisorService
Retrieves a list of incoming requests sent to the supervisor with the specified ID.- Specified by:
getIncomingRequests
in interfaceIRequestSupervisorService
- Parameters:
supervisorID
- the ID of the supervisor- Returns:
- an
ArrayList
ofRequest
objects representing the incoming requests sent to the supervisor
-
getOutgoingRequests
public java.util.ArrayList<Request> getOutgoingRequests(java.lang.String supervisorID)
Description copied from interface:IRequestSupervisorService
Retrieves a list of outgoing requests sent by the supervisor with the specified ID.- Specified by:
getOutgoingRequests
in interfaceIRequestSupervisorService
- Parameters:
supervisorID
- the ID of the supervisor- Returns:
- an
ArrayList
ofRequest
objects representing the outgoing requests sent by the supervisor
-
approveProject
public boolean approveProject(Request request)
Description copied from interface:IRequestSupervisorService
Approves the specified project request.- Specified by:
approveProject
in interfaceIRequestSupervisorService
- Parameters:
request
- theRequest
object to be approved- Returns:
- true if the request was approved successfully, false otherwise
-
rejectProject
public boolean rejectProject(Request request)
Description copied from interface:IRequestSupervisorService
Rejects the specified project request.- Specified by:
rejectProject
in interfaceIRequestSupervisorService
- Parameters:
request
- theRequest
object 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:IRequestSupervisorService
Creates a new transfer student request with the specified sender ID, receiver ID, project ID, and replacement supervisor ID.- Specified by:
createTransferStudentRequest
in 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
-
-