Project

General

Profile

« Previous | Next » 

Revision 61363

1. refactoring and changes of rest api

View differences:

RegistryCalls.java
4 4
import com.google.gson.JsonElement;
5 5
import com.google.gson.JsonObject;
6 6
import eu.dnetlib.repo.manager.domain.dto.Role;
7
import eu.dnetlib.repo.manager.domain.dto.User;
7 8
import eu.dnetlib.repo.manager.service.aai.registry.utils.RegistryUtils;
8 9
import eu.dnetlib.repo.manager.utils.HttpUtils;
9 10
import org.apache.log4j.Logger;
......
271 272
    }
272 273

  
273 274
    @Override
275
    public List<User> getUsers(Integer couId) {
276
        List<User> users = new ArrayList<>();
277
        JsonArray infos = getUserEmailByCouId(couId, false);
278

  
279
        infos.forEach(info -> {
280
            User user = new User();
281
            user.setEmail(info.getAsJsonObject().get("email").getAsString());
282

  
283
            users.add(user);
284
        });
285
        return users;
286
    }
287

  
288
    @Override
274 289
    public JsonArray getUserNamesByCouId(Integer couId, boolean admin) {
275 290
        Map<String, String> params = new HashMap<>();
276 291
        params.put("couid", couId.toString());

Also available in: Unified diff