public class Subscribe
extends java.lang.Object
| Constructor and Description |
|---|
Subscribe() |
| Modifier and Type | Method and Description |
|---|---|
static Collection[] |
getAvailableSubscriptions(Context context)
Find out which collections the currently logged in e-person can subscribe to
|
static Collection[] |
getAvailableSubscriptions(Context context,
EPerson eperson)
Find out which collections an e-person can subscribe to
|
static Collection[] |
getSubscriptions(Context context,
EPerson eperson)
Find out which collections an e-person is subscribed to
|
static boolean |
isSubscribed(Context context,
EPerson eperson,
Collection collection)
Is that e-person subscribed to that collection?
|
static void |
main(java.lang.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,
java.util.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.
|
static void |
subscribe(Context context,
EPerson eperson,
Collection collection)
Subscribe an e-person to a collection.
|
static void |
unsubscribe(Context context,
EPerson eperson,
Collection collection)
Unsubscribe an e-person to a collection.
|
public static void subscribe(Context context, EPerson eperson, Collection collection) throws java.sql.SQLException, AuthorizeException
context - DSpace contexteperson - EPerson to subscribecollection - Collection to subscribe tojava.sql.SQLExceptionAuthorizeExceptionpublic static void unsubscribe(Context context, EPerson eperson, Collection collection) throws java.sql.SQLException, AuthorizeException
null
for the collection unsubscribes the e-person from all collections they
are subscribed to.context - DSpace contexteperson - EPerson to unsubscribecollection - Collection to unsubscribe fromjava.sql.SQLExceptionAuthorizeExceptionpublic static Collection[] getSubscriptions(Context context, EPerson eperson) throws java.sql.SQLException
context - DSpace contexteperson - EPersonjava.sql.SQLExceptionpublic static Collection[] getAvailableSubscriptions(Context context) throws java.sql.SQLException
context - DSpace contexteperson - EPersonjava.sql.SQLExceptionpublic static Collection[] getAvailableSubscriptions(Context context, EPerson eperson) throws java.sql.SQLException
context - DSpace contexteperson - EPersonjava.sql.SQLExceptionpublic static boolean isSubscribed(Context context, EPerson eperson, Collection collection) throws java.sql.SQLException
context - DSpace contexteperson - find out if this e-person is subscribedcollection - find out if subscribed to this collectiontrue if they are subscribedjava.sql.SQLExceptionpublic static void processDaily(Context context, boolean test) throws java.sql.SQLException, java.io.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 - DSpace context objecttest - java.sql.SQLExceptionjava.io.IOExceptionpublic static void sendEmail(Context context, EPerson eperson, java.util.List<Collection> collections, boolean test) throws java.io.IOException, javax.mail.MessagingException, java.sql.SQLException
context - DSpace context objecteperson - eperson to send tocollections - List of collection IDs (Integers)test - java.io.IOExceptionjavax.mail.MessagingExceptionjava.sql.SQLExceptionpublic static void main(java.lang.String[] argv)
argv - command-line arguments, none used yetCopyright © 2018 DuraSpace. All Rights Reserved.