ref 13226:StorageHub - Update workspace-sharing-widget to SH
https://support.d4science.org/issues/13226 Fixed share folder with multiple users git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@179301 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
22fcb1a056
commit
258abab472
|
@ -283,8 +283,7 @@ public class GWTWorkspaceSharingBuilder {
|
||||||
return listContactsModel;
|
return listContactsModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<InfoContactModel> searchUsersFromKeyword(PortalContextInfo info, String keyword)
|
public List<InfoContactModel> searchUsersFromKeyword(PortalContextInfo info, String keyword) throws Exception {
|
||||||
throws Exception {
|
|
||||||
try {
|
try {
|
||||||
logger.debug("Search Keyword: " + keyword);
|
logger.debug("Search Keyword: " + keyword);
|
||||||
List<InfoContactModel> listInfoContactModel = new ArrayList<>();
|
List<InfoContactModel> listInfoContactModel = new ArrayList<>();
|
||||||
|
@ -311,10 +310,15 @@ public class GWTWorkspaceSharingBuilder {
|
||||||
* @return the list
|
* @return the list
|
||||||
*/
|
*/
|
||||||
public List<InfoContactModel> buildGxtInfoContactsFromPortalLogins(List<String> listPortalLogin) {
|
public List<InfoContactModel> buildGxtInfoContactsFromPortalLogins(List<String> listPortalLogin) {
|
||||||
|
|
||||||
List<InfoContactModel> listContact = new ArrayList<InfoContactModel>();
|
List<InfoContactModel> listContact = new ArrayList<InfoContactModel>();
|
||||||
for (String portalLogin : listPortalLogin)
|
|
||||||
listContact.add(buildGxtInfoContactFromPortalLogin(portalLogin));
|
try {
|
||||||
|
for (String portalLogin : listPortalLogin) {
|
||||||
|
listContact.add(buildGxtInfoContactFromPortalLogin(portalLogin));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Error in build list of contacts from portal logins: " + e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
return listContact;
|
return listContact;
|
||||||
}
|
}
|
||||||
|
@ -338,29 +342,29 @@ public class GWTWorkspaceSharingBuilder {
|
||||||
/**
|
/**
|
||||||
* Builds the gxt info contact from portal group.
|
* Builds the gxt info contact from portal group.
|
||||||
*
|
*
|
||||||
* @param grouoLogin
|
* @param groupLogin
|
||||||
* the grouo login
|
* the grouo login
|
||||||
* @return the info contact model
|
* @return the info contact model
|
||||||
*/
|
*/
|
||||||
protected InfoContactModel buildGxtInfoContactFromPortalGroup(String grouoLogin) {
|
protected InfoContactModel buildGxtInfoContactFromPortalGroup(String groupLogin) {
|
||||||
|
|
||||||
String groupName = "";
|
String groupName = "";
|
||||||
if (grouoLogin == null) {
|
if (groupLogin == null) {
|
||||||
logger.warn("GroupLogin is null, return empty");
|
logger.warn("GroupLogin is null, return empty");
|
||||||
grouoLogin = "";
|
groupLogin = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// RECOVERING VRE NAME
|
// RECOVERING VRE NAME
|
||||||
if (grouoLogin.contains("/")) {
|
if (groupLogin.contains("/")) {
|
||||||
int start = grouoLogin.lastIndexOf("/");
|
int start = groupLogin.lastIndexOf("/");
|
||||||
int end = grouoLogin.length();
|
int end = groupLogin.length();
|
||||||
if (start < end)
|
if (start < end)
|
||||||
groupName = grouoLogin.substring(start + 1, end);
|
groupName = groupLogin.substring(start + 1, end);
|
||||||
else
|
else
|
||||||
groupName = grouoLogin;
|
groupName = groupLogin;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new InfoContactModel(grouoLogin, grouoLogin, groupName, true);
|
return new InfoContactModel(groupLogin, groupLogin, groupName, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue