Revision 59763
Added by Konstantinos Triantafyllou over 3 years ago
RegistryCalls.java | ||
---|---|---|
28 | 28 |
@Autowired |
29 | 29 |
public JsonUtils jsonUtils; |
30 | 30 |
|
31 |
|
|
32 |
private String mapType(String type) { |
|
33 |
if(type.equals("organization")) { |
|
34 |
type = "institution"; |
|
35 |
} |
|
36 |
if(type.equals("ri")) { |
|
37 |
type = "community"; |
|
38 |
} |
|
39 |
return type; |
|
40 |
} |
|
41 |
|
|
31 | 42 |
/** |
32 | 43 |
* 1. Get CoPersonId by Email |
33 | 44 |
*/ |
... | ... | |
101 | 112 |
JsonArray cous = getCous(); |
102 | 113 |
Integer couId = null; |
103 | 114 |
for (JsonElement cou : cous) { |
104 |
if (cou.getAsJsonObject().get("Name").getAsString().equals(type + "." + id)) {
|
|
115 |
if (cou.getAsJsonObject().get("Name").getAsString().equals(mapType(type) + "." + id)) {
|
|
105 | 116 |
couId = cou.getAsJsonObject().get("Id").getAsInt(); |
106 | 117 |
} |
107 | 118 |
} |
Also available in: Unified diff
[Users | Trunk]: Fix get managers and members calls