Class OfficerRegistration
java.lang.Object
entity.request.Request
entity.request.OfficerRegistration
- All Implemented Interfaces:
Requestable
Represents a specific type of request where an Officer applies to register for
or be assigned to a specific project.
Extends the base
Request class and adds an approval status
(using the ApprovedStatus enum) to track the outcome of the registration request,
typically decided by a Manager.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.OfficerRegistration(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus) Parameterized constructor to create an OfficerRegistration request with specified initial details. -
Method Summary
Modifier and TypeMethodDescriptionGets the current approval status of this officer registration request.voidsetRegistrationStatus(ApprovedStatus registrationStatus) Sets the approval status of this officer registration request.Methods inherited from class entity.request.Request
getProjectID, getRequestID, getRequestStatus, getRequestType, getUserID, setProjectID, setRequestID, setRequestStatus, setRequestType, setUserID
-
Constructor Details
-
OfficerRegistration
public OfficerRegistration()Default constructor. Initializes a new OfficerRegistration instance by calling the defaultRequestconstructor. The specificregistrationStatuswill likely be null or require explicit setting later. -
OfficerRegistration
public OfficerRegistration(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus) Parameterized constructor to create an OfficerRegistration request with specified initial details. Calls theRequestconstructor to initialize common request fields (ID, type, user, project, status). Sets the initialregistrationStatusfor this registration request toApprovedStatus.PENDING.- Parameters:
requestID- The unique ID for this registration request.requestType- The type of request (should beRequestType.REGISTRATION).userID- The ID of the Officer submitting the registration request.projectID- The ID of the project the officer wants to register for.requestStatus- The initial overall processing status (e.g.,RequestStatus.PENDING).
-
-
Method Details
-
getRegistrationStatus
Gets the current approval status of this officer registration request.- Returns:
- The
ApprovedStatus(PENDING, SUCCESSFUL, or UNSUCCESSFUL).
-
setRegistrationStatus
Sets the approval status of this officer registration request. Typically called by a Manager or relevant controller when processing the request.- Parameters:
registrationStatus- The newApprovedStatusto set for the registration request.
-