public class Retired_Suggestion_Notifier
extends java.lang.Object
Retired_Suggestion_Notifier is a class for sending email notifications about suggestions that have been retired or released within various contexts. There are currently 3 supported notification contexts: Science Theme Leads (STLs), team members, and PDS releases. See the documentation for the different notify methods below for more information.
Note: It is assumed that this utility will be run shortly after the geometry retirement step has completed.
Retire_Suggestions
,
notifySTLs()
,
notifyTeamMembers()
,
notifyPDS()
Modifier and Type | Class and Description |
---|---|
static class |
Retired_Suggestion_Notifier.ExitCode
Exit status
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEBUG_EMAILS_PROPERTY
System properties related to debugging.
|
static java.lang.String |
DEBUG_MAIN_PROPERTY
System properties related to debugging.
|
static java.lang.String |
DEBUG_NOTIFY_PROPERTY
System properties related to debugging.
|
static java.lang.String |
DEBUG_PDS_PROPERTY
System properties related to debugging.
|
static java.lang.String |
DEBUG_TEAM_PROPERTY
System properties related to debugging.
|
static java.lang.String |
DEFAULT_CONFIGURATION_FILE
The default configuration file used if none is specified.
|
static int |
DEFAULT_SEARCH_DAYS
The default number of elapsed days to use when generating the retirement
reports.
|
static java.lang.String |
ID
Class identifier
|
Constructor and Description |
---|
Retired_Suggestion_Notifier()
The default constructor, creates a notifier using the
DEFAULT_CONFIGURATION_FILE
|
Retired_Suggestion_Notifier(PIRL.Configuration.Configuration configuration)
This constructor allows the specification of a configuration to use for
setting up the database connection.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] arguments)
Sends email notifications about suggestions that have been retired or
Observations that have been released (release functionality is pending).
|
void |
noop(boolean noop)
Sets the noop option.
|
void |
notifyPDS()
Sends PDS release notifications to all users that have opted in to receive
these emails.
|
void |
notifySTLs()
This method initiates the STL notification process.
|
void |
notifyTeamMembers()
Send retirement email notifications to team members.
|
void |
SetCurrentDate(java.lang.String date) |
int |
STLSearchDays()
Get the current number days the STL report uses as a search window to find
retired suggestions to report on.
|
void |
STLSearchDays(int search_days)
Sets the number of days to subtract from the current date to form a search
window for Observations that have been processed through retirement and reported
in the STL Science Theme retirement reports.
|
static void |
Usage(int exit_status,
org.apache.commons.cli.Options options)
Print usage information and exit.
|
void |
verbose(boolean verbose)
Sets the output to verbose.
|
public static final java.lang.String ID
public static final java.lang.String DEFAULT_CONFIGURATION_FILE
public static final int DEFAULT_SEARCH_DAYS
public static final java.lang.String DEBUG_MAIN_PROPERTY
public static final java.lang.String DEBUG_NOTIFY_PROPERTY
public static final java.lang.String DEBUG_EMAILS_PROPERTY
public static final java.lang.String DEBUG_PDS_PROPERTY
public static final java.lang.String DEBUG_TEAM_PROPERTY
public Retired_Suggestion_Notifier() throws PIRL.Configuration.Configuration_Exception, PIRL.Database.Database_Exception
PIRL.Configuration.Configuration_Exception
- if the DEFAULT_CONFIGURATION_FILE could not
be found or parsed.PIRL.Database.Database_Exception
- if a database connection can not be initiated.public Retired_Suggestion_Notifier(PIRL.Configuration.Configuration configuration) throws PIRL.Database.Database_Exception, PIRL.Configuration.Configuration_Exception
configuration
- the configuration to use to connect to the databasePIRL.Database.Database_Exception
- if a database connection can not be initiatedPIRL.Configuration.Configuration_Exception
- if there is a problem with the provided
configurationpublic void notifySTLs() throws PIRL.Database.Database_Exception
This method initiates the STL notification process. A list of suggestions retired is compiled for each science theme and sent to the Science Theme Lead via an email. The email is html formatted text holding a table which displays the list of suggestions retired by a given observation id (with hyperlinks to HiReport), as well as a some ancillary information, like the relation a suggestion is a member of, and the number of observations acquired in the relation.
The time frame over which the list of suggestions is compiled based on the value of the STL_Search_Days field. Defaulting to 7 days from the current time. The current time can be redefined however for debugging purposes
Finally, if a pair of stereo suggestions were retired by the same observation, then these are flagged as a warning in the table, so the STL can take action - if needed.
If no suggestions were retired within a given theme, then a "null" notification will be sent that indicates that no suggestions were retired.
PIRL.Database.Database_Exception
- if any of the underlying database queries failjavax.mail.MessagingException
- if an error occurs while sending mailSTLSearchDays(int)
public void notifyTeamMembers() throws PIRL.Database.Database_Exception
notifySTLs()
method, this method uses the STL_Search_Days variable to determine the time
period overwhich retired suggestions are searched for.PIRL.Database.Database_Exception
- if an error occurs during the database searches.STLSearchDays(int)
public void notifyPDS() throws PIRL.Database.Database_Exception
PIRL.Database.Database_Exception
- if a database error occurrs during any of the
database interactionsSTLSearchDays(int)
public void STLSearchDays(int search_days)
DEFAULT_SEARCH_DAYS
field.search_days
- - the number of days to search backwardnotifySTLs()
,
notifyTeamMembers()
,
notifyPDS()
public void SetCurrentDate(java.lang.String date)
public int STLSearchDays()
public void verbose(boolean verbose)
verbose
- public void noop(boolean noop)
noop
- public static void main(java.lang.String[] arguments)
Usage(int, Options)
method.
Exist status values
0 - Success
1 - Configuration Error
2 - Database Error
3 - Command line syntax error
arguments
- - command line string.public static void Usage(int exit_status, org.apache.commons.cli.Options options)
Usage: Retired_Suggestion_Notifier <Options> Options - [-Configuration <filename> [-Days <integer> [-Noop [-PDS_Release_Notice [-STL_Notice [-Team_Retirement_Notice [-Verbose [-Help]
exit_status
- Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona