Class Announcement

  • All Implemented Interfaces:
    IridaThing, Timestamped<java.lang.Long>, java.lang.Comparable<Announcement>

    @Entity
    public class Announcement
    extends java.lang.Object
    implements IridaThing, java.lang.Comparable<Announcement>
    An announcement object. Announcements can be created only by admin users, and announcements are displayed on the dashboard page.
    • Constructor Summary

      Constructors 
      Constructor Description
      Announcement​(java.lang.String title, java.lang.String message, boolean priority, User user)
      Create a new Announcement object, for display on the front page.
      Announcement​(java.lang.String title, java.lang.String message, boolean priority, User user, java.util.Date createdDate)
      Create a new Announcement object with a created date, for testing purposes.
    • Constructor Detail

      • Announcement

        public Announcement​(java.lang.String title,
                            java.lang.String message,
                            boolean priority,
                            User user)
        Create a new Announcement object, for display on the front page.
        Parameters:
        title - of the announcement
        message - Content of the announcement
        priority - of the announcement
        user - The User that created the announcement
      • Announcement

        public Announcement​(java.lang.String title,
                            java.lang.String message,
                            boolean priority,
                            User user,
                            java.util.Date createdDate)
        Create a new Announcement object with a created date, for testing purposes.
        Parameters:
        title - of the announcement
        message - Content of the announcement
        priority - of the announcement
        user - The User that created the announcement
        createdDate - of the announcement
    • Method Detail

      • compareTo

        public int compareTo​(Announcement other)
        Specified by:
        compareTo in interface java.lang.Comparable<Announcement>
      • getId

        public java.lang.Long getId()
        Description copied from interface: IridaThing
        Get the numerical identifier for this object
        Specified by:
        getId in interface IridaThing
        Specified by:
        getId in interface Timestamped<java.lang.Long>
        Returns:
        the numerical identifier for the object
      • getCreatedDate

        public java.util.Date getCreatedDate()
        Description copied from interface: Timestamped
        Get the created date of the object
        Specified by:
        getCreatedDate in interface Timestamped<java.lang.Long>
        Returns:
        A Date object of the created date
      • getTitle

        public java.lang.String getTitle()
      • getMessage

        public java.lang.String getMessage()
      • getPriority

        public boolean getPriority()
      • getUser

        public User getUser()
      • getLabel

        public java.lang.String getLabel()
        Description copied from interface: IridaThing
        Get a human readable label for this object.
        Specified by:
        getLabel in interface IridaThing
        Returns:
        a human-readable label for the object.
      • setTitle

        public void setTitle​(java.lang.String title)
      • setMessage

        public void setMessage​(java.lang.String message)
      • setPriority

        public void setPriority​(boolean priority)
      • setUser

        public void setUser​(User user)