19 package org.turro.mail.queue;
21 import java.util.Collection;
22 import java.util.EnumSet;
23 import org.turro.action.queue.IElephantNotification;
24 import org.turro.action.queue.NotificationCategory;
25 import org.turro.action.queue.NotificationRole;
26 import org.turro.action.queue.QueuePeriod;
27 import org.turro.annotation.ElephantNotification;
28 import org.turro.elephant.entities.db.QueueOptions;
29 import org.turro.plugin.contacts.IContact;
47 map.putAll(initCategories(
this));
61 map.putAll(initCategories(
this));
69 map.putAll(initCategories(
this));
78 return qo !=
null ? qo.
getPeriod() :
null;
119 public static final String
121 SYSTEM_NOTIFICATION =
"/system";
124 if(_categories ==
null) {
127 "Site notifications",
"Includes generic notifications from de web site in contexts where you participate, such as accepted comments.",
132 "System notification",
"dSystemNotification",
static final String GENERIC_NOTIFICATION
void periodToAll(String idCategory, QueuePeriod period)
void removeAll(String idCategory)
QueuePeriod period(String idCategory, IContact contact)
Collection< NotificationCategory > getCategories()
void checkConstraints(String idCategory)
void subscribe(String idCategory, IContact contact, QueuePeriod period)
void subscribeIfNot(String idCategory, IContact contact, QueuePeriod period)
Collection< String > getAllCategoryIds()
NotificationCategory getCategory(String id)
Collection< NotificationCategory > getAllCategories()
Collection< String > getCategoryIds()
NotificationCategory addCategory(String id, String name, String description, EnumSet< QueuePeriod > allowedPeriods, boolean unique, QueuePeriod defaultPeriod, IElephantNotification notification, NotificationRole role, Set< NotificationConstraint > constraints, boolean publishable)
void setPeriod(IContact contact, String idCategory, QueuePeriod queuePeriod, boolean override)
QueueOptions getConfiguration(IContact contact, String idCategory)
void setPeriodToAll(String idCategory, QueuePeriod period)
void removeOptions(String idCategory)