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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSubscriber
(Page page, String email) Add a subscriber to a pagegetSubscribers
(Page page) Get the subscribers on a pageboolean
isSubscriber
(Page page, String email) Determines if the given email is a subcriber of the given pagevoid
removeSubscriber
(Page page, String email) Remove a subscriber from a pagevoid
service
(ServiceManager smanager) void
setSubscribers
(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:
service
in 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
-