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) |
void |
deleteByEPerson(Context context,
EPerson ePerson) |
List<Subscription> |
findAll(Context context) |
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
findAll in interface SubscribeServiceSQLExceptionpublic void subscribe(Context context, EPerson eperson, Collection collection) throws SQLException, AuthorizeException
SubscribeServicesubscribe in interface SubscribeServicecontext - DSpace contexteperson - EPerson to subscribecollection - Collection to subscribe toSQLExceptionAuthorizeExceptionpublic 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 fromSQLExceptionAuthorizeExceptionpublic List<Subscription> getSubscriptions(Context context, EPerson eperson) throws SQLException
SubscribeServicegetSubscriptions in interface SubscribeServicecontext - DSpace contexteperson - EPersonSQLExceptionpublic List<Collection> getAvailableSubscriptions(Context context) throws SQLException
SubscribeServicegetAvailableSubscriptions in interface SubscribeServicecontext - DSpace contextSQLExceptionpublic List<Collection> getAvailableSubscriptions(Context context, EPerson eperson) throws SQLException
SubscribeServicegetAvailableSubscriptions in interface SubscribeServicecontext - DSpace contexteperson - EPersonSQLExceptionpublic 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 subscribedSQLExceptionpublic void deleteByCollection(Context context, Collection collection) throws SQLException
deleteByCollection in interface SubscribeServiceSQLExceptionpublic void deleteByEPerson(Context context, EPerson ePerson) throws SQLException
deleteByEPerson in interface SubscribeServiceSQLExceptionCopyright © 2016 DuraSpace. All rights reserved.