Class SignupTimeslotItem


  • public class SignupTimeslotItem
    extends Object

    This class holds the information of sign-up time slot. It's a wrapper class for RESTful case.

    • Field Detail

      • UNLIMITED

        public static final int UNLIMITED
        a constants maximum number for attendees
        See Also:
        Constant Field Values
    • Constructor Detail

      • SignupTimeslotItem

        public SignupTimeslotItem()
        constructor
    • Method Detail

      • getId

        public Long getId()
        get the sequence Id, which is generated by DB
        Returns:
        the sequence Id
      • setId

        public void setId​(Long id)
        this is a setter
        Parameters:
        id - the sequence Id
      • getStartTime

        public Date getStartTime()
        get the starting time of the time slot
        Returns:
        the starting time of the time slot
      • setStartTime

        public void setStartTime​(Date startTime)
        this is a setter
        Parameters:
        startTime - the starting time of the time slot
      • getEndTime

        public Date getEndTime()
        get the end time when the time slot ends
        Returns:
        the end time
      • setEndTime

        public void setEndTime​(Date endTime)
        this is a setter
        Parameters:
        endTime - a end time
      • isCanceled

        public boolean isCanceled()
        check if this time slot is cancelled
        Returns:
        true if this time slot is cancelled
      • setCanceled

        public void setCanceled​(boolean cancel)
        this is a setter
        Parameters:
        cancel - a boolean value
      • isLocked

        public boolean isLocked()
        check if the time slot is locked
        Returns:
        true if the time slot is locked
      • setLocked

        public void setLocked​(boolean locked)
        this is a setter
        Parameters:
        locked - a boolean value
      • getAttendees

        public List<SignupParticipant> getAttendees()
        get a list of SignupParticipant objects, who have signed up in the time slot
        Returns:
        a list of SignupParticipant objects
      • setAttendees

        public void setAttendees​(List<SignupParticipant> attendees)
        this is a setter
        Parameters:
        attendees - a list of SignupParticipant objects
      • getWaitingList

        public List<SignupParticipant> getWaitingList()
        get a list of SignupParticipant objects, who are on the waiting list in the time slot
        Returns:
        a list of SignupParticipant objects
      • setWaitingList

        public void setWaitingList​(List<SignupParticipant> waitingList)
        this is a setter
        Parameters:
        waitingList - a list of SignupParticipant objects, who are on the waiting list in the time slot
      • isDisplayAttendees

        public boolean isDisplayAttendees()
        check if the name of Attendee should be display to public
        Returns:
        true if the name of Attendee should be display to public
      • setDisplayAttendees

        public void setDisplayAttendees​(boolean showAttendees)
        this is a setter
        Parameters:
        showAttendees - a boolean value
      • isAvailable

        public boolean isAvailable()
        check if current time slot is available for adding more people
        Returns:
        true if current time slot is available for adding more people
      • isSignedUp

        public boolean isSignedUp()
        check to see if current user is signed up
        Returns:
        a boolean value
      • setSignedUp

        public void setSignedUp​(boolean signedUp)
      • isOnWaitList

        public boolean isOnWaitList()
        Check to see if current user is on the waiting list
        Returns:
      • setOnWaitList

        public void setOnWaitList​(boolean onWaitList)
      • getMaxNoOfAttendees

        public int getMaxNoOfAttendees()
        get the maximum number of attendees, which is allowed in the time slot
        Returns:
        the maximum number of attendees
      • setMaxNoOfAttendees

        public void setMaxNoOfAttendees​(int noOfAttendees)
        this is a setter
        Parameters:
        noOfAttendees - the maximum allowed number of attendees
      • isUnlimitedAttendee

        public boolean isUnlimitedAttendee()
        check if the time slot allows unlimited attendee to join
        Returns:
        true if the time slot allows unlimited attendee to join