fixed association group thread

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@146742 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-04-11 09:53:14 +00:00
parent 9551405b81
commit 5f799120df
1 changed files with 5 additions and 5 deletions

View File

@ -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<RolesCkanGroupOrOrg, List<String>> userAndRoles = catalogue.getRolesAndUsersGroup(groupTitle);
Map<RolesCkanGroupOrOrg, List<String>> userAndRoles = catalogue.getRolesAndUsersGroup(groupName);
if(userAndRoles.containsKey(RolesCkanGroupOrOrg.ADMIN)){