001
014
015 package com.liferay.portal.kernel.notifications;
016
017 import java.util.HashMap;
018 import java.util.Map;
019
020
023 public class UserNotificationDefinition {
024
025 public UserNotificationDefinition(
026 String portletId, long classNameId, int notificationType,
027 String description) {
028
029 _classNameId = classNameId;
030 _description = description;
031 _notificationType = notificationType;
032 _portletId = portletId;
033 }
034
035 public void addUserNotificationDeliveryType(
036 UserNotificationDeliveryType userNotificationDeliveryType) {
037
038 _userNotificationDeliveryTypes.put(
039 userNotificationDeliveryType.getType(),
040 userNotificationDeliveryType);
041 }
042
043 public long getClassNameId() {
044 return _classNameId;
045 }
046
047 public String getDescription() {
048 return _description;
049 }
050
051 public int getNotificationType() {
052 return _notificationType;
053 }
054
055 public String getPortletId() {
056 return _portletId;
057 }
058
059 public UserNotificationDeliveryType getUserNotificationDeliveryType(
060 int deliveryType) {
061
062 return _userNotificationDeliveryTypes.get(deliveryType);
063 }
064
065 public Map<Integer, UserNotificationDeliveryType>
066 getUserNotificationDeliveryTypes() {
067
068 return _userNotificationDeliveryTypes;
069 }
070
071 private long _classNameId;
072 private String _description;
073 private int _notificationType;
074 private String _portletId;
075 private Map<Integer, UserNotificationDeliveryType>
076 _userNotificationDeliveryTypes =
077 new HashMap<Integer, UserNotificationDeliveryType>();
078
079 }