diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/threads/AssociationToGroupAndNotifyThread.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/threads/AssociationToGroupAndNotifyThread.java index d651f5c..a36a821 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/threads/AssociationToGroupAndNotifyThread.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/server/threads/AssociationToGroupAndNotifyThread.java @@ -99,7 +99,7 @@ public class AssociationToGroupAndNotifyThread extends Thread { logger.info("Was product put into group? " + putIntoGroup); if(putIntoGroup) - notifyGroupAdmins(catalogue, groupTitle, username); + notifyGroupAdmins(catalogue, group.getName(), group.getTitle(), username); } } @@ -112,11 +112,11 @@ public class AssociationToGroupAndNotifyThread extends Thread { if(groups != null) for (GroupBean groupBean : groups) { - boolean putIntoGroup = catalogue.assignDatasetToGroup(groupBean.getGroupTitle(), datasetId, catalogue.getApiKeyFromUsername(username)); + boolean putIntoGroup = catalogue.assignDatasetToGroup(groupBean.getGroupName(), datasetId, catalogue.getApiKeyFromUsername(username)); logger.info("Was product put into group" + groupBean.getGroupTitle() + "? " + putIntoGroup); if(putIntoGroup) - notifyGroupAdmins(catalogue, groupBean.getGroupTitle(), username); + notifyGroupAdmins(catalogue, groupBean.getGroupName() ,groupBean.getGroupTitle(), username); } } @@ -127,10 +127,10 @@ public class AssociationToGroupAndNotifyThread extends Thread { * @param groupTitle * @param catalogue */ - private void notifyGroupAdmins(DataCatalogue catalogue, String groupTitle, String username){ + private void notifyGroupAdmins(DataCatalogue catalogue, String groupName, String groupTitle, String username){ // get the groups admin - Map> userAndRoles = catalogue.getRolesAndUsersGroup(groupTitle); + Map> userAndRoles = catalogue.getRolesAndUsersGroup(groupName); if(userAndRoles.containsKey(RolesCkanGroupOrOrg.ADMIN)){