Class EventPost
java.lang.Object
io.github.navjotsrakhra.eventmanager.dataModel.EventPost
The EventPost class represents an event post entity with details such as title, content, location, and date/time information.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor initializes the 'postedAt' timestamp to the current date and time.EventPost(String title, String content, String location, LocalDate startDay, LocalDate endDay, LocalTime startTime, LocalTime endTime) Constructor for creating an EventPost with provided details. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetContent(String content) Set the content or description of the event.voidSet the ending date of the event, performing date validation.voidsetEndTime(LocalTime endTime) Set the ending time of the event, performing time validation.voidvoidsetLocation(String location) Set the location where the event will take place.voidsetPostedBy(String postedBy) voidsetStartDay(LocalDate startDay) Set the starting date of the event, performing date validation.voidsetStartTime(LocalTime startTime) Set the starting time of the event, performing time validation.voidSet the title of the event.
-
Constructor Details
-
EventPost
public EventPost()Default constructor initializes the 'postedAt' timestamp to the current date and time. -
EventPost
public EventPost(String title, String content, String location, LocalDate startDay, LocalDate endDay, LocalTime startTime, LocalTime endTime) throws DateValidationFailedException Constructor for creating an EventPost with provided details.- Parameters:
title- The title of the event.content- The content or description of the event.location- The location where the event will take place.startDay- The starting date of the event.endDay- The ending date of the event.startTime- The starting time of the event.endTime- The ending time of the event.- Throws:
DateValidationFailedException- If date validation fails.
-
-
Method Details
-
setTitle
Set the title of the event.- Parameters:
title- The title to be set.
-
setContent
Set the content or description of the event.- Parameters:
content- The content to be set.
-
setLocation
Set the location where the event will take place.- Parameters:
location- The location to be set.
-
setStartDay
Set the starting date of the event, performing date validation.- Parameters:
startDay- The starting date to be set.- Throws:
DateValidationFailedException- If date validation fails.
-
setEndDay
Set the ending date of the event, performing date validation.- Parameters:
endDay- The ending date to be set.- Throws:
DateValidationFailedException- If date validation fails.
-
setStartTime
Set the starting time of the event, performing time validation.- Parameters:
startTime- The starting time to be set.- Throws:
DateValidationFailedException- If time validation fails.
-
setEndTime
Set the ending time of the event, performing time validation.- Parameters:
endTime- The ending time to be set.- Throws:
DateValidationFailedException- If time validation fails.
-
setId
-
setPostedBy
-