fix for incident #7553
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@144984 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
44589386fe
commit
9205d0c4df
|
@ -5,6 +5,9 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="share-updates"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -455,26 +455,28 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
|
|||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Extract mentioned VRE's group names
|
||||
* @return Set<String> of vre groups' names
|
||||
*/
|
||||
private static Set<String> getVreGroupsNames(ArrayList<ItemBean> mentionedUsers){
|
||||
|
||||
|
||||
Set<String> toReturn = new HashSet<String>();
|
||||
RoleManager rManager = new LiferayRoleManager();
|
||||
for (ItemBean itemBean : mentionedUsers) {
|
||||
|
||||
if(itemBean.isItemGroup())
|
||||
try {
|
||||
toReturn.add(rManager.getTeam(Long.parseLong(itemBean.getId())).getTeamName());
|
||||
} catch (NumberFormatException | UserManagementSystemException
|
||||
| TeamRetrievalFault e) {
|
||||
_log.warn("Unable to add this team", e);
|
||||
}
|
||||
if (mentionedUsers != null && !mentionedUsers.isEmpty()) {
|
||||
for (ItemBean itemBean : mentionedUsers) {
|
||||
|
||||
if(itemBean.isItemGroup())
|
||||
try {
|
||||
toReturn.add(rManager.getTeam(Long.parseLong(itemBean.getId())).getTeamName());
|
||||
} catch (NumberFormatException | UserManagementSystemException
|
||||
| TeamRetrievalFault e) {
|
||||
_log.warn("Unable to add this team", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
@ -604,7 +606,7 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* generate a preview of the file, upload the file on the storage and shorts the link
|
||||
*/
|
||||
|
@ -686,7 +688,7 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
|
|||
_log.debug("Returning httpURL=" + httpURL);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* tries the following in the indicated order for Populating the Link preview
|
||||
* Open Graph protocol
|
||||
|
|
Loading…
Reference in New Issue