changed utils method to be able to send a post by social-service in testing mode

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/grsf-manage-widget@178680 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-03-25 10:54:07 +00:00
parent 632e085e9e
commit fcb1370bd9
1 changed files with 11 additions and 6 deletions

View File

@ -194,13 +194,18 @@ public class Utils {
throw new IllegalArgumentException("Item bean to manage cannot be null");
try(CloseableHttpClient httpClient = HttpClientBuilder.create().build();){
// send update to the knowledge base
GRSFUpdaterServiceClient.updateKB(httpClient, serviceUrl, bean, catalogue, username, fullName);
// if there are merges, update the status of the other involved records
if(bean.isMergesInvolved())
updateStatusInvolvedRecords(bean, catalogue);
//ADDED BY FRANCESCO
if(Utils.isIntoPortal()) {
// send update to the knowledge base
GRSFUpdaterServiceClient.updateKB(httpClient, serviceUrl, bean, catalogue, username, fullName);
// if there are merges, update the status of the other involved records
if(bean.isMergesInvolved())
updateStatusInvolvedRecords(bean, catalogue);
}
// require social networking url
final String baseUrlSocial = SocialCommunications.getBaseUrlSocialService(httpServletRequest);