Class Announcement
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.model.announcements.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 newAnnouncementobject, 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 newAnnouncementobject with a created date, for testing purposes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Announcement other)java.util.DategetCreatedDate()Get the created date of the objectjava.lang.LonggetId()Get the numerical identifier for this objectjava.lang.StringgetLabel()Get a human readable label for this object.java.lang.StringgetMessage()booleangetPriority()java.lang.StringgetTitle()UsergetUser()voidsetMessage(java.lang.String message)voidsetPriority(boolean priority)voidsetTitle(java.lang.String title)voidsetUser(User user)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.corefacility.bioinformatics.irida.model.IridaThing
getIdentifier, setLabel
-
-
-
-
Constructor Detail
-
Announcement
public Announcement(java.lang.String title, java.lang.String message, boolean priority, User user)Create a newAnnouncementobject, for display on the front page.- Parameters:
title- of the announcementmessage- Content of the announcementpriority- of the announcementuser- TheUserthat created the announcement
-
Announcement
public Announcement(java.lang.String title, java.lang.String message, boolean priority, User user, java.util.Date createdDate)Create a newAnnouncementobject with a created date, for testing purposes.- Parameters:
title- of the announcementmessage- Content of the announcementpriority- of the announcementuser- TheUserthat created the announcementcreatedDate- of the announcement
-
-
Method Detail
-
compareTo
public int compareTo(Announcement other)
- Specified by:
compareToin interfacejava.lang.Comparable<Announcement>
-
getId
public java.lang.Long getId()
Description copied from interface:IridaThingGet the numerical identifier for this object- Specified by:
getIdin interfaceIridaThing- Specified by:
getIdin interfaceTimestamped<java.lang.Long>- Returns:
- the numerical identifier for the object
-
getCreatedDate
public java.util.Date getCreatedDate()
Description copied from interface:TimestampedGet the created date of the object- Specified by:
getCreatedDatein interfaceTimestamped<java.lang.Long>- Returns:
- A
Dateobject 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:IridaThingGet a human readable label for this object.- Specified by:
getLabelin interfaceIridaThing- 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)
-
-