public class SubscribeServiceImpl extends Object implements SubscribeService
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected CollectionService |
collectionService |
protected SubscriptionDAO |
subscriptionDAO |
| Modifier | Constructor and Description |
|---|---|
protected |
SubscribeServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteByCollection(Context context,
Collection collection)
Delete subscription by collection.
|
void |
deleteByEPerson(Context context,
EPerson ePerson)
Delete subscription by eperson (subscriber).
|
List<Subscription> |
findAll(Context context)
Subscribe an e-person to a collection.
|
List<Collection> |
getAvailableSubscriptions(Context context)
Find out which collections the currently logged in e-person can subscribe to
|
List<Collection> |
getAvailableSubscriptions(Context context,
EPerson eperson)
Find out which collections an e-person can subscribe to
|
List<Subscription> |
getSubscriptions(Context context,
EPerson eperson)
Find out which collections an e-person is subscribed to
|
boolean |
isSubscribed(Context context,
EPerson eperson,
Collection collection)
Is that e-person subscribed to that collection?
|
void |
subscribe(Context context,
EPerson eperson,
Collection collection)
Subscribe an e-person to a collection.
|
void |
unsubscribe(Context context,
EPerson eperson,
Collection collection)
Unsubscribe an e-person to a collection.
|
@Autowired(required=true) protected SubscriptionDAO subscriptionDAO
@Autowired(required=true) protected AuthorizeService authorizeService
@Autowired(required=true) protected CollectionService collectionService
public List<Subscription> findAll(Context context) throws SQLException
SubscribeServicefindAll in interface SubscribeServicecontext - DSpace contextSQLException - An exception that provides information on a database access error or other errors.public void subscribe(Context context, EPerson eperson, Collection collection) throws SQLException, AuthorizeException
SubscribeServicesubscribe in interface SubscribeServicecontext - DSpace contexteperson - EPerson to subscribecollection - Collection to subscribe toSQLException - An exception that provides information on a database access error or other errors.AuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.public void unsubscribe(Context context, EPerson eperson, Collection collection) throws SQLException, AuthorizeException
SubscribeServicenull
for the collection unsubscribes the e-person from all collections they
are subscribed to.unsubscribe in interface SubscribeServicecontext - DSpace contexteperson - EPerson to unsubscribecollection - Collection to unsubscribe fromSQLException - An exception that provides information on a database access error or other errors.AuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.public List<Subscription> getSubscriptions(Context context, EPerson eperson) throws SQLException
SubscribeServicegetSubscriptions in interface SubscribeServicecontext - DSpace contexteperson - EPersonSQLException - An exception that provides information on a database access error or other errors.public List<Collection> getAvailableSubscriptions(Context context) throws SQLException
SubscribeServicegetAvailableSubscriptions in interface SubscribeServicecontext - DSpace contextSQLException - An exception that provides information on a database access error or other errors.public List<Collection> getAvailableSubscriptions(Context context, EPerson eperson) throws SQLException
SubscribeServicegetAvailableSubscriptions in interface SubscribeServicecontext - DSpace contexteperson - EPersonSQLException - An exception that provides information on a database access error or other errors.public boolean isSubscribed(Context context, EPerson eperson, Collection collection) throws SQLException
SubscribeServiceisSubscribed in interface SubscribeServicecontext - DSpace contexteperson - find out if this e-person is subscribedcollection - find out if subscribed to this collectiontrue if they are subscribedSQLException - An exception that provides information on a database access error or other errors.public void deleteByCollection(Context context, Collection collection) throws SQLException
SubscribeServicedeleteByCollection in interface SubscribeServicecontext - DSpace contextcollection - find out if subscribed to this collectionSQLException - An exception that provides information on a database access error or other errors.public void deleteByEPerson(Context context, EPerson ePerson) throws SQLException
SubscribeServicedeleteByEPerson in interface SubscribeServicecontext - DSpace contextePerson - find out if this e-person is subscribedSQLException - An exception that provides information on a database access error or other errors.Copyright © 2019 DuraSpace. All rights reserved.