Package org.dspace.alerts
Class SystemWideAlert
- java.lang.Object
-
- org.dspace.alerts.SystemWideAlert
-
- All Implemented Interfaces:
ReloadableEntity<Integer>
@Entity public class SystemWideAlert extends Object implements ReloadableEntity<Integer>
Database object representing system-wide alerts
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSystemWideAlert()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Returntrueifotheris the same SystemWideAlert as this object,falseotherwiseAllowSessionsEnumgetAllowSessions()Retrieve what kind of sessions are allowed while the system-wide alert is activeDategetCountdownTo()Retrieve the date to which will be count down when the system-wide alert is activeIntegergetID()This method returns the ID that the system-wide alert holds within the databaseStringgetMessage()Retrieve the message of the system-wide alertinthashCode()booleanisActive()Retrieve whether the system-wide alert is activevoidsetActive(boolean active)Set whether the system-wide alert is activevoidsetAllowSessions(AllowSessionsEnum allowSessions)Set what kind of sessions are allowed while the system-wide alert is activevoidsetCountdownTo(Date countdownTo)Set the date to which will be count down when the system-wide alert is activevoidsetID(Integer alertID)Set the ID for the system-wide alertvoidsetMessage(String message)Set the message of the system-wide alert
-
-
-
Method Detail
-
getID
public Integer getID()
This method returns the ID that the system-wide alert holds within the database- Specified by:
getIDin interfaceReloadableEntity<Integer>- Returns:
- The ID that the system-wide alert holds within the database
-
setID
public void setID(Integer alertID)
Set the ID for the system-wide alert- Parameters:
alertID- The ID to set
-
getMessage
public String getMessage()
Retrieve the message of the system-wide alert- Returns:
- the message of the system-wide alert
-
setMessage
public void setMessage(String message)
Set the message of the system-wide alert- Parameters:
message- The message to set
-
getAllowSessions
public AllowSessionsEnum getAllowSessions()
Retrieve what kind of sessions are allowed while the system-wide alert is active- Returns:
- what kind of sessions are allowed while the system-wide alert is active
-
setAllowSessions
public void setAllowSessions(AllowSessionsEnum allowSessions)
Set what kind of sessions are allowed while the system-wide alert is active- Parameters:
allowSessions- Integer representing what kind of sessions are allowed
-
getCountdownTo
public Date getCountdownTo()
Retrieve the date to which will be count down when the system-wide alert is active- Returns:
- the date to which will be count down when the system-wide alert is active
-
setCountdownTo
public void setCountdownTo(Date countdownTo)
Set the date to which will be count down when the system-wide alert is active- Parameters:
countdownTo- The date to which will be count down
-
isActive
public boolean isActive()
Retrieve whether the system-wide alert is active- Returns:
- whether the system-wide alert is active
-
setActive
public void setActive(boolean active)
Set whether the system-wide alert is active- Parameters:
active- Whether the system-wide alert is active
-
equals
public boolean equals(Object other)
Returntrueifotheris the same SystemWideAlert as this object,falseotherwise
-
-