You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by gi...@apache.org on 2015/06/05 10:21:07 UTC

[1/2] syncope git commit: [SYNCOPE-667] During tasks creation, the notification manager now returns a list of notification task

Repository: syncope
Updated Branches:
  refs/heads/1_2_X 5dbe698d9 -> 7aca6b213


[SYNCOPE-667] During tasks creation, the notification manager now returns a list of notification task


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/18394d3c
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/18394d3c
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/18394d3c

Branch: refs/heads/1_2_X
Commit: 18394d3c5027ae9e4442414a7f886e422904d77f
Parents: 8106e24
Author: giacomolm <gi...@hotmail.it>
Authored: Fri Jun 5 09:30:16 2015 +0200
Committer: giacomolm <gi...@hotmail.it>
Committed: Fri Jun 5 09:30:16 2015 +0200

----------------------------------------------------------------------
 .../syncope/core/notification/NotificationManager.java   | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/18394d3c/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java b/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
index 341a0bd..48caa54 100644
--- a/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
+++ b/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
@@ -262,7 +262,7 @@ public class NotificationManager {
     /**
      * Create notification tasks for each notification matching the given user id and (some of) tasks performed.
      */
-    public void createTasks(
+    public List<NotificationTask> createTasks(
             final AuditElements.EventCategoryType type,
             final String category,
             final String subcategory,
@@ -274,6 +274,7 @@ public class NotificationManager {
 
         SubjectType subjectType = null;
         AbstractSubject subject = null;
+        List<NotificationTask> notificationList = new ArrayList<NotificationTask>();
 
         if (before instanceof UserTO) {
             subjectType = SubjectType.USER;
@@ -327,15 +328,17 @@ public class NotificationManager {
                     } else if (subject instanceof SyncopeRole) {
                         model.put("role", roleDataBinder.getRoleTO((SyncopeRole) subject));
                     }
-
-                    taskDAO.save(getNotificationTask(notification, subject, model));
+                    NotificationTask notificationTask = getNotificationTask(notification, subject, model);
+                    notificationTask = taskDAO.save(notificationTask);
+                    notificationList.add(notificationTask);                    
                 }
             } else {
                 LOG.debug("Notification {}, userAbout {}, roleAbout {} is deactivated, "
                         + "notification task will not be created", notification.getId(),
                         notification.getUserAbout(), notification.getRoleAbout());
             }
-        }
+        }        
+        return notificationList;
     }
 
     private String getRecipientEmail(


[2/2] syncope git commit: Merge branch '1_2_X' of https://git-wip-us.apache.org/repos/asf/syncope into 1_2_X

Posted by gi...@apache.org.
Merge branch '1_2_X' of https://git-wip-us.apache.org/repos/asf/syncope into 1_2_X


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7aca6b21
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7aca6b21
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7aca6b21

Branch: refs/heads/1_2_X
Commit: 7aca6b2130047e8d58a2539f36da9dd906b379d1
Parents: 18394d3 5dbe698
Author: giacomolm <gi...@hotmail.it>
Authored: Fri Jun 5 09:40:59 2015 +0200
Committer: giacomolm <gi...@hotmail.it>
Committed: Fri Jun 5 09:40:59 2015 +0200

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------