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 newAnnouncement
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 newAnnouncement
object with a created date, for testing purposes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Announcement other)
java.util.Date
getCreatedDate()
Get the created date of the objectjava.lang.Long
getId()
Get the numerical identifier for this objectjava.lang.String
getLabel()
Get a human readable label for this object.java.lang.String
getMessage()
boolean
getPriority()
java.lang.String
getTitle()
User
getUser()
void
setMessage(java.lang.String message)
void
setPriority(boolean priority)
void
setTitle(java.lang.String title)
void
setUser(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 newAnnouncement
object, for display on the front page.- Parameters:
title
- of the announcementmessage
- Content of the announcementpriority
- of the announcementuser
- TheUser
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 newAnnouncement
object with a created date, for testing purposes.- Parameters:
title
- of the announcementmessage
- Content of the announcementpriority
- of the announcementuser
- TheUser
that created the announcementcreatedDate
- of the announcement
-
-
Method Detail
-
compareTo
public int compareTo(Announcement other)
- Specified by:
compareTo
in interfacejava.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 interfaceIridaThing
- Specified by:
getId
in interfaceTimestamped<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 interfaceTimestamped<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 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)
-
-