Package org.sakaiproject.pasystem.api
Class Banner
- java.lang.Object
-
- org.sakaiproject.pasystem.api.Banner
-
- All Implemented Interfaces:
Comparable<Banner>
public class Banner extends Object implements Comparable<Banner>
A data object representing a banner.
-
-
Constructor Summary
Constructors Constructor Description Banner(String message, String hosts, boolean active, long startTime, long endTime, String type)Banner(String uuid, String message, String hosts, boolean active, long startTime, long endTime, String type)Banner(String uuid, String message, String hosts, boolean active, long startTime, long endTime, String type, boolean isDismissed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AcknowledgementTypecalculateAcknowledgementType()Determine the default acknowledgement type for this banner.intcompareTo(Banner other)booleanequals(Object obj)intgetSeverityScore()A numeric type representing this banner's importance (higher number = more important)StringgetType()The type of this banner (high, medium, low).StringgetUuid()inthashCode()booleanisActiveForHost(String hostname)True if this banner is active now and assigned to the current server.booleanisActiveNow()Whether or not this banner should be displayed at this moment in time.booleanisDismissible()Whether or not this banner type can be dismissed by a user.Errorsvalidate()Check that the values we've been given make sense.
-
-
-
Method Detail
-
getType
public String getType()
The type of this banner (high, medium, low).
-
calculateAcknowledgementType
public AcknowledgementType calculateAcknowledgementType()
Determine the default acknowledgement type for this banner.
-
compareTo
public int compareTo(Banner other)
- Specified by:
compareToin interfaceComparable<Banner>
-
getSeverityScore
public int getSeverityScore()
A numeric type representing this banner's importance (higher number = more important)
-
getUuid
public String getUuid() throws MissingUuidException
- Throws:
MissingUuidException
-
isActiveNow
public boolean isActiveNow()
Whether or not this banner should be displayed at this moment in time.
-
isDismissible
public boolean isDismissible()
Whether or not this banner type can be dismissed by a user.
-
isActiveForHost
public boolean isActiveForHost(String hostname)
True if this banner is active now and assigned to the current server.
-
validate
public Errors validate()
Check that the values we've been given make sense.
-
-