Project

General

Profile

« Previous | Next » 

Revision 56896

Checking if repository has a piwik site before creating an identity for it

View differences:

modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/utils/Converter.java
281 281

  
282 282
        //TODO check identitites
283 283
        //Map<String,String> identity = new HashMap<>();
284
        Map<String, Object> identities = new HashMap<>();
285
        identities.put("issuertype", "piwik");
286
        identities.put("pid","piwik:"+repository.getPiwikInfo().getSiteId());
287
        repositoryMap.put("identities",identities);
284

  
285
        if (repository.getPiwikInfo() != null) {
286
            Map<String, Object> identities = new HashMap<>();
287

  
288
            identities.put("issuertype", "piwik");
289
            identities.put("pid", "piwik:" + repository.getPiwikInfo().getSiteId());
290

  
291
            repositoryMap.put("identities", identities);
292
        }
293

  
288 294
        repositoryMap.put("subjects","");
289 295

  
290 296
        return mapper.writeValueAsString(repositoryMap);

Also available in: Unified diff