HiRISE

HiRISE.HiPlan.HOGG
Class MotD

java.lang.Object
  extended by HiRISE.HiPlan.HOGG.MotD

public class MotD
extends Object

A message-of-the-day mechanism for the HOGG. And very much a work in progress.

Version:
2.6
Author:
Christian Schaller - UA/PIRL

Field Summary
static String APRIL_FOOLS_DAY
          The name of the system property for overriding the date of April Fool's day.
static String ID
          Class identification name with source code version and date.
static String WITHHOLD_APRIL_FOOLS
          The name of the system property for withholding the April Fool's Day prank.
static String WITHHOLD_MOTD
          The name of the system property for withholding the message of the day.
 
Constructor Summary
MotD()
          Creates a new message-of-the-day mechanism.
 
Method Summary
static boolean isAprilFoolsDay()
          Determines whether today is April Fool's Day.
 void showAprilFoolsMessage()
          Displays the April Fools Day message if today is April Fools Day.
 void showMessage()
          Displays the message of the day in a simple message dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

WITHHOLD_MOTD

public static final String WITHHOLD_MOTD
The name of the system property for withholding the message of the day. The message is withheld when the property's value is true.

See Also:
Boolean.getBoolean(String), Constant Field Values

WITHHOLD_APRIL_FOOLS

public static final String WITHHOLD_APRIL_FOOLS
The name of the system property for withholding the April Fool's Day prank. When this property's value is true, the isAprilFoolsDay() method returns false, regardless of the day.

See Also:
Boolean.getBoolean(String), Constant Field Values

APRIL_FOOLS_DAY

public static final String APRIL_FOOLS_DAY
The name of the system property for overriding the date of April Fool's day. The value must be in the form MM DD, where MM is the month (January = 1) and DD is the day of the month.

See Also:
Constant Field Values
Constructor Detail

MotD

public MotD()
Creates a new message-of-the-day mechanism.

Method Detail

showMessage

public void showMessage()
Displays the message of the day in a simple message dialog. If there is no message, no dialog is displayed.

There currently is no message, so this method does nothing.


showAprilFoolsMessage

public void showAprilFoolsMessage()
Displays the April Fools Day message if today is April Fools Day.

See Also:
isAprilFoolsDay()

isAprilFoolsDay

public static boolean isAprilFoolsDay()
Determines whether today is April Fool's Day. This is a critical function of any proper HiPlan application.

Today is April Fool's day if today is April 1 through April 4. If today is not April Fool's day, this method returns false. If the system property WITHHOLD_APRIL_FOOLS is true, then today is also not April Fools and this method returns false.

For testing or just seeking giggles, the day of April Fools Day may be changed via the system property APRIL_FOOLS_DAY. This method still checks whether today is that day through that day plus three days. For example, if the day is set to August 29, this method checks for August 29 through September 1.


HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona