Class PageSubscriptionDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.pagesubscription.PageSubscriptionDAO
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
DAO for page subscription
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubscriber(Page page, String email) Add a subscriber to a pagegetSubscribers(Page page) Get the subscribers on a pagebooleanisSubscriber(Page page, String email) Determines if the given email is a subcriber of the given pagevoidremoveSubscriber(Page page, String email) Remove a subscriber from a pagevoidservice(ServiceManager smanager) voidsetSubscribers(Page page, Set<String> subscribers) Set the subscribers to a pageMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role
-
-
Constructor Details
-
PageSubscriptionDAO
public PageSubscriptionDAO()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getSubscribers
Get the subscribers on a page- Parameters:
page- the page- Returns:
- the subscribers
- Throws:
IllegalArgumentException- if the page does not support subscription
-
isSubscriber
Determines if the given email is a subcriber of the given page- Parameters:
page- The pageemail- The email to test- Returns:
- true if the given email is a subcriber of the given page
-
addSubscriber
Add a subscriber to a page- Parameters:
page- The pageemail- The email to add- Throws:
IllegalArgumentException- if the page does not support subscription
-
removeSubscriber
Remove a subscriber from a page- Parameters:
page- The pageemail- The email to remove- Throws:
IllegalArgumentException- if the page does not support subscription
-
setSubscribers
Set the subscribers to a page- Parameters:
page- The pagesubscribers- The email of subscribers- Throws:
IllegalArgumentException- if the page does not support subscription
-