Search in sources :

Example 1 with EmailNotificationImpl

use of org.jbpm.services.task.impl.model.EmailNotificationImpl in project jbpm by kiegroup.

the class CollectionUtils method readNotificationList.

public static List<Notification> readNotificationList(ObjectInput in) throws IOException, ClassNotFoundException {
    int size = in.readInt();
    List<Notification> list = new ArrayList<Notification>(size);
    for (int i = 0; i < size; i++) {
        Notification item = null;
        switch(NotificationType.valueOf(in.readUTF())) {
            case Default:
                {
                    item = new NotificationImpl();
                    break;
                }
            case Email:
                {
                    item = new EmailNotificationImpl();
                    break;
                }
        }
        item.readExternal(in);
        list.add(item);
    }
    return list;
}
Also used : EmailNotificationImpl(org.jbpm.services.task.impl.model.EmailNotificationImpl) NotificationImpl(org.jbpm.services.task.impl.model.NotificationImpl) ArrayList(java.util.ArrayList) EmailNotificationImpl(org.jbpm.services.task.impl.model.EmailNotificationImpl) Notification(org.kie.internal.task.api.model.Notification)

Aggregations

ArrayList (java.util.ArrayList)1 EmailNotificationImpl (org.jbpm.services.task.impl.model.EmailNotificationImpl)1 NotificationImpl (org.jbpm.services.task.impl.model.NotificationImpl)1 Notification (org.kie.internal.task.api.model.Notification)1