minor fixes

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/grsf-manage-widget@163068 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2018-02-08 16:03:13 +00:00
parent cf872c6d87
commit 6a2dd96752
1 changed files with 4 additions and 6 deletions

View File

@ -195,12 +195,12 @@ public class Utils {
try(CloseableHttpClient httpClient = HttpClientBuilder.create().build();){
// if there are merges, update the status of the involved records immediately
if(bean.isMergesInvolved())
updateStatusInvolvedRecords(bean, catalogue);
// 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);
@ -299,8 +299,6 @@ public class Utils {
for(SimilarGRSFRecord s: bean.getSimilarGrsfRecords()){
if(s.isSuggestedMerge()){
String productId = s.getKnowledgeBaseId();
// CkanDataset dataset = catalogue.getDataset(productId, sysApi);
// Map<String, List<String>> extrasMap = getExtrasAsHashMap(dataset.getExtras());
Map<String, List<String>> updateStatus = new HashMap<String, List<String>>(1);
updateStatus.put(Constants.STATUS_OF_THE_GRSF_RECORD_CUSTOM_KEY, Arrays.asList(Status.To_be_Merged.getOrigName()));
catalogue.patchProductCustomFields(productId, sysApi, updateStatus, true);