org.hackystat.tickertape.tickerlingua
Class Tickertape

java.lang.Object
  extended by org.hackystat.tickertape.tickerlingua.Tickertape

public class Tickertape
extends java.lang.Object

Represents a Tickertape, which is a notification.

Author:
Philip Johnson

Constructor Summary
Tickertape(java.lang.String id, double intervalHours, boolean enabled, java.lang.String starttime, java.lang.String description, java.util.List<HackystatProject> projects, java.util.List<NotificationService> services, java.lang.Class<? extends Ticker> tickerClass, Properties tickerProperties)
          Creates and returns a new Tickertape instance, or throws a TickerLinguaException if the passed parameters are not valid.
 
Method Summary
 boolean enabled()
          True if this tickertape is enabled.
 java.lang.String getDescription()
          The description of this tickertape.
 java.util.List<HackystatProject> getHackystatProjects()
          The set of projects involved in this notification.
 java.lang.String getId()
          Return the unique ID.
 double getIntervalHours()
          Return the interval in hours for wakeups of this notification.
 java.util.List<NotificationService> getNotificationServices()
          The notification services for this notification.
 java.lang.String getStartTime()
          The String representting the time when this should wake up, or null if immediately.
 Ticker getTicker()
          The class that implements this notification behavior.
 java.util.Map<java.lang.String,java.lang.String> getTickerProperties()
          Return the (possibly empty) properties associated with this ticker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tickertape

public Tickertape(java.lang.String id,
                  double intervalHours,
                  boolean enabled,
                  java.lang.String starttime,
                  java.lang.String description,
                  java.util.List<HackystatProject> projects,
                  java.util.List<NotificationService> services,
                  java.lang.Class<? extends Ticker> tickerClass,
                  Properties tickerProperties)
           throws TickerLinguaException
Creates and returns a new Tickertape instance, or throws a TickerLinguaException if the passed parameters are not valid.

Parameters:
id - A unique id (not validated).
intervalHours - The interval as hours.
enabled - If this ticker is to be instantiated or not.
starttime - A string indicating the start time. Not yet validated.
description - A description of this tickertape.
projects - A non-empty list of HackystatProject instances.
services - A possibly empty list of notification services. (One might use email).
tickerClass - The ticker class instance.
tickerProperties - A possibly empty Properties instance.
Throws:
TickerLinguaException - If there is not at least one project and notification service.
Method Detail

getId

public java.lang.String getId()
Return the unique ID.

Returns:
The id.

getIntervalHours

public double getIntervalHours()
Return the interval in hours for wakeups of this notification.

Returns:
The wakeup interval.

enabled

public boolean enabled()
True if this tickertape is enabled.

Returns:
True if enabled.

getDescription

public java.lang.String getDescription()
The description of this tickertape.

Returns:
The description.

getStartTime

public java.lang.String getStartTime()
The String representting the time when this should wake up, or null if immediately.

Returns:
The time to wakeup, or null if immediate.

getHackystatProjects

public java.util.List<HackystatProject> getHackystatProjects()
The set of projects involved in this notification.

Returns:
The projects.

getNotificationServices

public java.util.List<NotificationService> getNotificationServices()
The notification services for this notification.

Returns:
The notification services.

getTicker

public Ticker getTicker()
The class that implements this notification behavior.

Returns:
The notification class.

getTickerProperties

public java.util.Map<java.lang.String,java.lang.String> getTickerProperties()
Return the (possibly empty) properties associated with this ticker.

Returns:
The ticker properties.