Package org.dspace.checker
Class DailyReportEmailer
- java.lang.Object
-
- org.dspace.checker.DailyReportEmailer
-
public class DailyReportEmailer extends Object
The email reporter creates and sends emails to an administrator. This only reports information for today's date. It is expected this will be used just after the checksum checker has been run.
- Author:
- Jim Downing, Grace Carpenter, Nathan Sarr
-
-
Constructor Summary
Constructors Constructor Description DailyReportEmailer()Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)Allows users to have email sent to them.voidsendReport(File attachment, int numberOfBitstreams)Send the report through email.
-
-
-
Method Detail
-
sendReport
public void sendReport(File attachment, int numberOfBitstreams) throws IOException, javax.mail.MessagingException
Send the report through email.- Parameters:
attachment- the file containing the reportnumberOfBitstreams- the number of bitstreams reported- Throws:
IOException- if IO exception occursjavax.mail.MessagingException- if message cannot be sent.
-
main
public static void main(String[] args)
Allows users to have email sent to them. The default is to send all reports in one email- -h
- help
- -d
- Select deleted bitstreams
- -m
- Bitstreams missing from assetstore
- -c
- Bitstreams whose checksums were changed
- -n
- Bitstreams whose checksums were changed
- -a
- Send all reports in one email
- Parameters:
args- the command line arguments given
-
-