- java.lang.Object
-
- models.Request
-
- models.ChangeProjectTitleRequest
-
public class ChangeProjectTitleRequest extends Request
TheChangeProjectTitleRequest
class represents a request from a supervisor to change the title of a project. It is a subclass of theRequest
class.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
newTitle
The new title for the project.
-
Constructor Summary
Constructors Constructor Description ChangeProjectTitleRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, int requestID, RequestStatus status, java.util.ArrayList<java.lang.String> history, java.lang.String newTitle)
Constructs aChangeProjectTitleRequest
object to initialize an existing request.ChangeProjectTitleRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, java.lang.String newTitle)
Constructs aChangeProjectTitleRequest
object to create a new request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
approve()
Approves the request to change the project title and updates the project's title.java.lang.String
getNewTitle()
Returns the new title for the project in the request.-
Methods inherited from class models.Request
addHistory, getHistory, getProject, getReceiver, getRequestID, getSender, getStatus, getType, reject, setHistory, setStatus, setType
-
-
-
-
Constructor Detail
-
ChangeProjectTitleRequest
public ChangeProjectTitleRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, int requestID, RequestStatus status, java.util.ArrayList<java.lang.String> history, java.lang.String newTitle)
Constructs aChangeProjectTitleRequest
object to initialize an existing request.- Parameters:
senderID
- the ID of the user who sent the requestreceiverID
- the ID of the user who receives the requestprojectID
- the ID of the project related to the requestrequestID
- the ID of the requeststatus
- the current status of the requesthistory
- the history of the requestnewTitle
- the new title for the project
-
ChangeProjectTitleRequest
public ChangeProjectTitleRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, java.lang.String newTitle)
Constructs aChangeProjectTitleRequest
object to create a new request.- Parameters:
senderID
- the ID of the user who sent the requestreceiverID
- the ID of the user who receives the requestprojectID
- the ID of the project related to the requestnewTitle
- the new title for the project
-
-