public class SubscribeCLITool extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] argv)
Method for invoking subscriptions via the command line
|
static void |
processDaily(Context context,
boolean test)
Process subscriptions.
|
static void |
sendEmail(Context context,
EPerson eperson,
List<Collection> collections,
boolean test)
Sends an email to the given e-person with details of new items in the
given collections, items that appeared yesterday.
|
public static void processDaily(Context context, boolean test) throws SQLException, IOException
Yesterday's newly available items are included. If this is run at for example midday, any items that have been made available during the current day will not be included, but will be included in the next day's run.
For example, if today's date is 2002-10-10 (in UTC) items made available during 2002-10-09 (UTC) will be included.
context - The relevant DSpace Context.test - If true, do a "dry run", i.e. don't actually send email, just log the attemptSQLException - An exception that provides information on a database access error or other errors.IOException - A general class of exceptions produced by failed or interrupted I/O operations.public static void sendEmail(Context context, EPerson eperson, List<Collection> collections, boolean test) throws IOException, javax.mail.MessagingException, SQLException
context - DSpace context objecteperson - eperson to send tocollections - List of collection IDs (Integers)test - If true, do a "dry run", i.e. don't actually send email, just log the attemptIOException - A general class of exceptions produced by failed or interrupted I/O operations.javax.mail.MessagingException - A general class of exceptions for sending email.SQLException - An exception that provides information on a database access error or other errors.public static void main(String[] argv)
argv - the command line arguments givenCopyright © 2019 DuraSpace. All rights reserved.